|
|
@ -63,6 +63,7 @@ export class PlanComponent implements OnInit { |
|
|
|
ServeManager.Init(this.buildingBISrv, this.objectsSrv); |
|
|
|
ServeManager.Init(this.buildingBISrv, this.objectsSrv); |
|
|
|
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement; |
|
|
|
this.canvas = this.element.nativeElement.querySelector('#center') as HTMLCanvasElement; |
|
|
|
this.game.init(this.canvas); |
|
|
|
this.game.init(this.canvas); |
|
|
|
|
|
|
|
|
|
|
|
this.companyData = (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization || {} |
|
|
|
this.companyData = (JSON.parse(sessionStorage.getItem('userdataOfgasstation'))).organization || {} |
|
|
|
let editMode = sessionStorage.getItem('isGasStation') |
|
|
|
let editMode = sessionStorage.getItem('isGasStation') |
|
|
|
if (editMode == 'false') { |
|
|
|
if (editMode == 'false') { |
|
|
@ -72,6 +73,7 @@ export class PlanComponent implements OnInit { |
|
|
|
this.editMode = false |
|
|
|
this.editMode = false |
|
|
|
ModeManager.currentMode = ModeType.Look |
|
|
|
ModeManager.currentMode = ModeType.Look |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//监听 delete键盘事件
|
|
|
|
//监听 delete键盘事件
|
|
|
|
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { |
|
|
|
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { |
|
|
|
if (event.keyCode == 46) { //delete
|
|
|
|
if (event.keyCode == 46) { //delete
|
|
|
|