We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8518e11 commit 6e32f3eCopy full SHA for 6e32f3e
src/utils/Droppable.js
@@ -112,8 +112,13 @@ export default class Droppable {
112
let comp;
113
if (!cancelled) {
114
comp = wrapper.append(content)[0];
115
- const { left, top, position } = target.getStyle();
116
- comp.addStyle({ left, top, position });
+ const canvasOffset = editor.Canvas.getOffset();
+ const { top, left, position } = target.getStyle();
117
+ comp.addStyle({
118
+ left: parseFloat(left) - canvasOffset.left + 'px',
119
+ top: parseFloat(top) - canvasOffset.top + 'px',
120
+ position,
121
+ });
122
}
123
this.handleDragEnd(comp, dt);
124
target.remove();
0 commit comments