Skip to content

Commit

Permalink
fix(stage): 流式布局resize从上或者左边调整,选中框出现错位
Browse files Browse the repository at this point in the history
fix #297
  • Loading branch information
roymondchen authored and jia000 committed Aug 30, 2022
1 parent 4a59b4b commit 9e16747
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/stage/src/StageDragResize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
Expand Down

0 comments on commit 9e16747

Please sign in to comment.