Pārlūkot izejas kodu

3dModeling MainPanel.js 韩正义 commit at 2021-03-04

韩正义 4 gadi atpakaļ
vecāks
revīzija
52b4ff08ea
1 mainītis faili ar 34 papildinājumiem un 0 dzēšanām
  1. 34 0
      3dModeling/tjby21/MainPanel.js

+ 34 - 0
3dModeling/tjby21/MainPanel.js

@@ -64,3 +64,37 @@ class MainPanel {
             } else {
                 this.building.unexpandFloors({
                     'time': 500,
+                    'complete': function () { that.isExpandBuilding = false; }
+                })
+            }
+        }
+    }
+    // 展开的楼层收回去
+    resetExpand() {
+        var that = this;
+        if (this.isExpandBuilding) {
+            this.toolBar.data.expandBuilding = false;
+            this.building.unexpandFloors({
+                'time': 500,
+                'complete': function () { that.isExpandBuilding = false; }
+            })
+        }
+    }
+    goinBuild(boolValue) {
+        delMydiv();
+        this.resetExpand();
+        var name = boolValue ? '返回室外' : '进入建筑';
+        this.toolImgs.img3.name(name);
+        if (boolValue) {
+            removeMark();
+            this.app.level.change(app.buildings[0]);
+            var domDiv = document.getElementById('bottomBackground');
+            if (domDiv) {
+                domDiv.remove();
+            }
+        }
+        else {
+            this.app.level.change(app.root.campuses[0]);
+        }
+    }
+}