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