소스 검색

feat: 修改保存

gemercheung 10 달 전
부모
커밋
08cf377c3f
2개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/view/case/draw/board/editCAD/Geometry/BgImage.js
  2. 5 0
      src/view/case/draw/board/editCAD/Load.js

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

@@ -30,6 +30,10 @@ export default class BgImage extends Geometry {
     this.image = imgData;
   }
 
+  setResolution(width, height) {
+    this.width = width;
+    this.width = height;
+  }
   setUrl(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.center,
         );
+    
         if (floor.bgImage.hasOwnProperty("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) {
         floorplanService.setBoardFrame(floor.noBoardFrame);