Browse Source

feat: 修改保存

gemercheung 10 months ago
parent
commit
08cf377c3f

+ 4 - 0
src/view/case/draw/board/editCAD/Geometry/BgImage.js

@@ -30,6 +30,10 @@ export default class BgImage extends Geometry {
     this.image = imgData;
     this.image = imgData;
   }
   }
 
 
+  setResolution(width, height) {
+    this.width = width;
+    this.width = height;
+  }
   setUrl(url) {
   setUrl(url) {
     this.url = url;
     this.url = url;
   }
   }

+ 5 - 0
src/view/case/draw/board/editCAD/Load.js

@@ -181,9 +181,14 @@ export default class Load {
           floor.bgImage.url,
           floor.bgImage.url,
           floor.bgImage.center,
           floor.bgImage.center,
         );
         );
+    
         if (floor.bgImage.hasOwnProperty("scale")) {
         if (floor.bgImage.hasOwnProperty("scale")) {
           bgImage.setScale(floor.bgImage.scale);
           bgImage.setScale(floor.bgImage.scale);
         }
         }
+        if (floor.bgImage.hasOwnProperty("width") && floor.bgImage.hasOwnProperty("height")) {
+          // debugger
+          // bgImage.setResolution(floor.bgImage.width,floor.bgImage.height);
+        }
       }
       }
       if (floor.noBoardFrame) {
       if (floor.noBoardFrame) {
         floorplanService.setBoardFrame(floor.noBoardFrame);
         floorplanService.setBoardFrame(floor.noBoardFrame);