Browse Source

修复创建设备时,没默认选中并弹出属性栏的bug

dev
刘向辉 3 years ago
parent
commit
f903c43453
  1. 7
      src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

7
src/app/babylon/view/facilityinfoinscene-window/facilityinfoinscene-window.ts

@ -2,6 +2,7 @@ import { AbstractMesh, Color3, EventState, Mesh, PickingInfo, PointerEventTypes,
import { classToClass } from "class-transformer"; import { classToClass } from "class-transformer";
import { PlanComponent } from "src/app/pages/plan/plan.component"; import { PlanComponent } from "src/app/pages/plan/plan.component";
import { ModelChangeType } from "../../controller/data-manager"; import { ModelChangeType } from "../../controller/data-manager";
import { EventManager } from "../../controller/event-manager/event-manager";
import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input"; import { Event_KeyboardInput } from "../../controller/event-manager/events/event-keyboard-input";
import { Event_ModelInfoChange } from "../../controller/event-manager/events/event-modelinfo-change"; import { Event_ModelInfoChange } from "../../controller/event-manager/events/event-modelinfo-change";
import { ModeManager, ModeType } from "../../controller/mode-manager"; import { ModeManager, ModeType } from "../../controller/mode-manager";
@ -261,7 +262,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
FacilityInfoInSceneWindow.instance = this; FacilityInfoInSceneWindow.instance = this;
this.three = PlanComponent.instance; this.three = PlanComponent.instance;
// EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange); EventManager.addListener(Event_ModelInfoChange, this.onModelInfoChange);
GizmoTool.onPickMeshInfoObservable.add(this.onClickModel); GizmoTool.onPickMeshInfoObservable.add(this.onClickModel);
this.currentFacility = []; this.currentFacility = [];
@ -275,7 +276,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
onClose() { onClose() {
super.onClose(); super.onClose();
//EventManager.removeCallback(Event_ModelInfoChange, this.onModelInfoChange); EventManager.removeCallback(Event_ModelInfoChange, this.onModelInfoChange);
GizmoTool.onPickMeshInfoObservable.removeCallback(this.onClickModel); GizmoTool.onPickMeshInfoObservable.removeCallback(this.onClickModel);
} }
@ -638,7 +639,7 @@ export class FacilityInfoInSceneWindow extends UIBase {
} }
// facilityInfo.setSelectEnable(true); // facilityInfo.setSelectEnable(true);
// this.selectFacilityItemToThree(facilityInfoUIItem); this.selectFacilityItemToThree([facilityInfoUIItem], true);
} }
//this.onClickModel(facilityInfoUIItem); //this.onClickModel(facilityInfoUIItem);

Loading…
Cancel
Save