editor: fix canvas wlxml listener nodeMoved event handling
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 14 Feb 2014 14:45:41 +0000 (15:45 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 14 Feb 2014 14:47:00 +0000 (15:47 +0100)
nodeAdded handler was getting called with invalid context

src/editor/modules/documentCanvas/canvas/wlxmlListener.js

index 8275751..0ae8885 100644 (file)
@@ -68,7 +68,7 @@ var handlers = {
         referenceElement[referenceAction](actionArg);
     },
     nodeMoved: function(event) {
         referenceElement[referenceAction](actionArg);
     },
     nodeMoved: function(event) {
-        return handlers.nodeAdded(event, true);
+        return handlers.nodeAdded.call(this, event, true);
     },
     nodeDetached: function(event) {
         var canvasNode = utils.findCanvasElementInParent(event.meta.node, event.meta.parent);
     },
     nodeDetached: function(event) {
         var canvasNode = utils.findCanvasElementInParent(event.meta.node, event.meta.parent);