Browse Source

修复罩棚问题

dev
刘向辉 3 years ago
parent
commit
35f1674947
  1. 1
      src/app/babylon/model/info/model/model-info.ts
  2. 8
      src/app/babylon/view/building-window/building-window.ts
  3. 1
      src/app/babylon/view/toolbar-window/toobar-window.ts
  4. 2
      src/app/pages/plan/plan.component.ts

1
src/app/babylon/model/info/model/model-info.ts

@ -145,7 +145,6 @@ export class ModelInfo {
if (this.modelBox != null) {
if (play) {
SceneManager.Instance.addToHighLight(this.modelBox as Mesh, Color3.Green());
console.log("高亮", this.modelBox.name);
}
else {
SceneManager.Instance.removeFromHighLight(this.modelBox as Mesh);

8
src/app/babylon/view/building-window/building-window.ts

@ -644,7 +644,6 @@ export class BuildingWindow extends UIBase {
* @param show
*/
showJYZModules(type: JYZInfoMoudleType, show: boolean) {
console.log("切换页签", type, show);
if (this.currentBuidngItem == null) {
return;
}
@ -655,7 +654,6 @@ export class BuildingWindow extends UIBase {
if (this.facilitysByMoudle.has(type)) {
facilityByType = this.facilitysByMoudle.get(type);
}
console.log("显示设备", facilityByType);
for (let i = 0; i < facilityByType.length; i++) {
let infos = facilityByType[i].facilityInfo;
if (infos != null) {
@ -670,12 +668,10 @@ export class BuildingWindow extends UIBase {
if (this.zdByMoudle.has(type)) {
zdByType = this.zdByMoudle.get(type);
}
console.log("阻挡物", zdByType);
for (let i = 0; i < zdByType.length; i++) {
let infos = zdByType[i].facilityInfo;
if (infos != null) {
for (let j = 0; j < infos.length; j++) {
console.log("隐藏阻挡物", infos[j]);
infos[j].setEnable(!show);
}
}
@ -684,7 +680,6 @@ export class BuildingWindow extends UIBase {
this.currentJYZInfoMoudleType = type;
}
else {
console.log("隐藏", this.currentJYZInfoMoudleType);
this.currentJYZInfoMoudleType = null;
// SceneManager.Instance.highLightLayer.removeAllMeshes();
@ -733,9 +728,8 @@ export class BuildingWindow extends UIBase {
* @param show false
*/
showZP(show: boolean) {
console.log("展示罩棚", show)
this.initFacilityTypeByMoudleType(JYZInfoMoudleType.ZP, this.currentBuidngItem.buildingInfo);
let zpInfoByTypes = this.facilitysByMoudle.get(JYZInfoMoudleType.ZP);
let zpInfoByTypes = this.zdByMoudle.get(JYZInfoMoudleType.ZP);
if (zpInfoByTypes != null) {
for (let i = 0; i < zpInfoByTypes.length; i++) {
let infos = zpInfoByTypes[i].facilityInfo;

1
src/app/babylon/view/toolbar-window/toobar-window.ts

@ -115,7 +115,6 @@ export class ToolbarWindow extends UIBase {
* @param show false表示隐藏罩棚
*/
showZP(show: boolean) {
console.log("显示罩棚", show);
BuildingWindow.instance.showZP(show);
}

2
src/app/pages/plan/plan.component.ts

@ -138,7 +138,7 @@ export class PlanComponent implements OnInit {
//切换 头部罩棚
toggleHeaderAwning(isOpen: boolean) {
this.isOpenAwning = isOpen
this.isOpenAwning = isOpen;
ToolbarWindow.instance.showZP(isOpen)
}

Loading…
Cancel
Save