internal container wip: fixing setup of some canvas dom events
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Sun, 4 Aug 2013 20:51:08 +0000 (22:51 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 5 Aug 2013 10:20:06 +0000 (12:20 +0200)
modules/documentCanvas/canvas/canvas.js

index f96e62e..83fc504 100644 (file)
@@ -206,9 +206,9 @@ $.extend(Canvas.prototype, {
                 }
             });
 
                 }
             });
 
-            this.wrapper.on('click', '[wlxml-tag], [document-text-element]', function(e) {
+            this.wrapper.on('click', '[document-node-element], [document-text-element]', function(e) {
                 e.stopPropagation();
                 e.stopPropagation();
-                canvas.setCurrentElement(canvas.getDocumentElement(e.target), {caretTo: false});
+                canvas.setCurrentElement(canvas.getDocumentElement(e.currentTarget), {caretTo: false});
             });
 
             var observer = new MutationObserver(function(mutations) {
             });
 
             var observer = new MutationObserver(function(mutations) {
@@ -221,8 +221,8 @@ $.extend(Canvas.prototype, {
             observer.observe(this.d[0], config);
 
 
             observer.observe(this.d[0], config);
 
 
-            this.wrapper.on('mouseover', '[wlxml-tag], [document-text-element]', function(e) {
-                var el = canvas.getDocumentElement(e.target);
+            this.wrapper.on('mouseover', '[document-node-element], [document-text-element]', function(e) {
+                var el = canvas.getDocumentElement(e.currentTarget);
                 if(!el)
                     return;
                 e.stopPropagation();
                 if(!el)
                     return;
                 e.stopPropagation();
@@ -230,8 +230,8 @@ $.extend(Canvas.prototype, {
                     el = el.parent();
                 el.toggleLabel(true);
             });
                     el = el.parent();
                 el.toggleLabel(true);
             });
-            this.wrapper.on('mouseout', '[wlxml-tag], [document-text-element]', function(e) {
-                var el = canvas.getDocumentElement(e.target);
+            this.wrapper.on('mouseout', '[document-node-element], [document-text-element]', function(e) {
+                var el = canvas.getDocumentElement(e.currentTarget);
                 if(!el)
                     return;
                 e.stopPropagation();
                 if(!el)
                     return;
                 e.stopPropagation();