Skip to content

Commit

Permalink
fix(stage): 有margin的组件拖动大小时top偏移
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Dec 22, 2023
1 parent 1073204 commit 3204204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/stage/src/DragResizeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class DragResizeHelper {
this.moveableHelper.onResize(e);
const { marginLeft, marginTop } = getMarginValue(this.target);
this.target.style.left = `${this.frameSnapShot.left + beforeTranslate[0] - marginLeft}px`;
this.target.style.top = `${this.frameSnapShot.top + beforeTranslate[1] - marginTop} - marginToppx`;
this.target.style.top = `${this.frameSnapShot.top + beforeTranslate[1] - marginTop}px`;
}

this.target.style.width = `${width}px`;
Expand Down

0 comments on commit 3204204

Please sign in to comment.