From 11dd751f22c3ef3a5a14799a22bcb9446ee0acf5 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 31 Mar 2019 19:38:54 +0200 Subject: [PATCH] Setup units in onStart in ComponentDrag --- src/commands/view/ComponentDrag.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/view/ComponentDrag.js b/src/commands/view/ComponentDrag.js index 332425dd0..d58ddca70 100644 --- a/src/commands/view/ComponentDrag.js +++ b/src/commands/view/ComponentDrag.js @@ -306,7 +306,13 @@ module.exports = { if (style.position !== position) { const { left, top, width, height } = editor.Canvas.offset(target.getEl()); - this.setPosition({ x: left, y: top, position, width, height }); + this.setPosition({ + x: left, + y: top, + width: `${width}px`, + height: `${height}px`, + position + }); } },