From 5e6bc48dea7573493f856174a35ff7d16fc66cf0 Mon Sep 17 00:00:00 2001 From: Emil Sedgh Date: Sun, 3 Nov 2019 22:00:25 -0800 Subject: [PATCH] Define editor first component.setDragMode('absolute') and then start dragging, you'd get a lot of `editor is not defined` errors. --- src/commands/view/ComponentDrag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/view/ComponentDrag.js b/src/commands/view/ComponentDrag.js index 2dee0a6e4..5c94f4cbb 100644 --- a/src/commands/view/ComponentDrag.js +++ b/src/commands/view/ComponentDrag.js @@ -120,7 +120,7 @@ export default { }, updateGuides(guides) { - (guides || this.guides).forEach(item => { + const { editor } = this(guides || this.guides).forEach(item => { const { origin } = item; const { top, height, left, width } = editor.Canvas.getElementPos(origin);