haojianlong 5 éve
szülő
commit
cfed3b8e64
1 módosított fájl, 3 hozzáadás és 4 törlés
  1. 3 4
      src/components/business_space/newGraphy/graphy.vue

+ 3 - 4
src/components/business_space/newGraphy/graphy.vue

@@ -221,7 +221,6 @@ export default {
     getGraphy() {
       let that = this;
       that.clearGraphy()
-      that.view = new SGraphyView('floorCanvas')
       that.scene = new DivideFloorScene();
       that.canvasLoading = true;
       that.scene.loadUrl(`/image-service/common/file_get?systemId=revit&key=${this.FloorMap}`).then(() => {
@@ -486,10 +485,10 @@ export default {
     // 清除canvas
     clearGraphy() {
       if (this.view) {
-        this.view = null;
-        this.scene.root.children = null;
-        this.scene = null;
+        this.view.scene = null;
+        return
       }
+      this.view = new SGraphyView('floorCanvas')
     },
     // 工具栏操作
     // 移动底图