Jelajahi Sumber

修改 遮罩白色以后定位问题 修改引擎版本,外接矩阵

haojianlong 5 tahun lalu
induk
melakukan
5d7ad22f3f

+ 2 - 2
package.json

@@ -20,9 +20,9 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.9",
-    "@saga-web/cad-engine": "2.0.538",
+    "@saga-web/cad-engine": "2.0.541",
     "@saga-web/draw": "2.1.75",
-    "@saga-web/graphy": "2.1.40",
+    "@saga-web/graphy": "2.1.42",
     "axios": "^0.18.0",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",

+ 5 - 1
src/components/business_space/newGraphy/graphy.vue

@@ -361,7 +361,7 @@ export default {
         this.scene.isSpaceSelectable = false;
         // 绘制业务空间
         that.getBusinessSpace();
-        that.view.fitSceneToView();
+        that.fit();
         that.view.minScale = that.view.scale;
         if (that.$refs.canvasFun) {
           that.$refs.canvasFun.everyScale = that.view.scale;
@@ -1090,6 +1090,10 @@ export default {
     },
     // 适配底图到窗口
     fit() {
+      if (this.scene.sceneMark) {
+        this.view.fitItemToView([this.scene.sceneMark])
+        return
+      }
       this.view.fitSceneToView()
     },
     // 保存为png

+ 2 - 1
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -10,7 +10,7 @@
 
 <script>
 import { SGraphyView } from "@saga-web/graphy/lib";
-import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
+import { DivideFloorScene, FloorView, Opt } from "@saga-web/cad-engine/lib"
 import { SColor, SPoint } from "@saga-web/draw/lib";
 import canvasFun from "@/components/business_space/newGraphy/canvasFun"
 import { floorQuery } from "@/api/scan/request";
@@ -53,6 +53,7 @@ export default {
   },
   created() {
     this.FloorID = this.$route.query.FloorID;
+    Opt.sceneMarkColor = new SColor('#00000080');
     if (!this.dialog) {
       this.init();
     }