fix(stage): 流式布局resize从上或者左边调整,选中框出现错位

fix #297
This commit is contained in:
roymondchen 2022-08-30 14:31:20 +08:00 committed by jia000
parent 4a59b4b0f4
commit 9e167474a2

View File

@ -263,12 +263,13 @@ export default class StageDragResize extends EventEmitter {
const { beforeTranslate } = drag;
this.dragStatus = StageDragStatus.ING;
this.moveableHelper?.onResize(e);
// 流式布局
if (this.mode === Mode.SORTABLE) {
this.target.style.top = '0px';
this.dragEl.style.width = `${width}px`;
this.dragEl.style.height = `${height}px`;
} else {
this.moveableHelper?.onResize(e);
this.target.style.left = `${frame.left + beforeTranslate[0]}px`;
this.target.style.top = `${frame.top + beforeTranslate[1]}px`;
}