qinyan 1 rok pred
rodič
commit
626aac7762

+ 0 - 1
src/controllers/wxController.ts

@@ -92,7 +92,6 @@ export class wxController {
   }) {
     shareData = Object.assign({}, this.shareData, shareData);
     this.shareData = shareData;
-    console.error("shareData **************: ", shareData);
   }
 
   setConfig(options: any) {

+ 6 - 2
src/modules/editor/controllers/TransferCtrl/transforms/resize.ts

@@ -2,7 +2,7 @@ import { TransCreateFn, TransferCtrl } from "..";
 
 function getResize(this: TransferCtrl, direction: string) {
   const { transEvent, currComp } = this;
-  const size = currComp.layout.size || [0, 0];
+  const size = currComp.layout.size ? [...currComp.layout.size] : [0, 0];
   if (direction.indexOf("x") != -1) {
     size[0] = transEvent.width + transEvent.offsetX * 2;
   }
@@ -22,7 +22,11 @@ const resize: TransCreateFn = (direction: string) => ({
     });
   },
   mouseup() {
-    this.currComp.layout.size = getResize.call(this, direction);
+    this.module.actions.updateCompData(
+      this.currComp,
+      "layout.size",
+      getResize.call(this, direction)
+    );
   },
 });