canvas: wlxmlListener fix
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 25 Oct 2013 14:21:43 +0000 (16:21 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 2 Dec 2013 13:50:52 +0000 (14:50 +0100)
Listener was installing handlers on every listenTo call.

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

index ec3001d..ecf4900 100644 (file)
@@ -14,6 +14,7 @@ $.extend(Listener.prototype, {
         if(wlxmlDocument === this.wlxmlDocument) {
             return;
         }
         if(wlxmlDocument === this.wlxmlDocument) {
             return;
         }
+        this.wlxmlDocument = wlxmlDocument;
 
         wlxmlDocument.on('change', function(event) {
             var handler = handlers[event.type];
 
         wlxmlDocument.on('change', function(event) {
             var handler = handlers[event.type];