fix(stage): 有margin的组件拖动大小时top偏移

re #559
This commit is contained in:
roymondchen 2023-12-22 14:31:53 +08:00
parent 1073204858
commit 320420478c

View File

@ -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`;