Skip to content

Commit

Permalink
fix(editor): 拖动组件进画布后,父容器位置计算有误 (#565)
Browse files Browse the repository at this point in the history
Co-authored-by: fanliming <[email protected]>
  • Loading branch information
lmf and fanliming authored Jan 10, 2024
1 parent 84cbc74 commit 115123a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/layouts/workspace/viewer/Stage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ const dropHandler = async (e: DragEvent) => {
if (parentEl && doc) {
const { left: parentLeft, top: parentTop } = getOffset(parentEl);
left = left - calcValueByFontsize(doc, parentLeft);
top = top - calcValueByFontsize(doc, parentTop);
left = left - calcValueByFontsize(doc, parentLeft) * zoom.value;
top = top - calcValueByFontsize(doc, parentTop) * zoom.value;
}
}
Expand Down

0 comments on commit 115123a

Please sign in to comment.