From e7de024e8c0798383a31b7c8bb08dc31a5ce876a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Sun, 4 Aug 2013 22:51:08 +0200 Subject: [PATCH] internal container wip: fixing setup of some canvas dom events --- modules/documentCanvas/canvas/canvas.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index f96e62e..83fc504 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -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(); - canvas.setCurrentElement(canvas.getDocumentElement(e.target), {caretTo: false}); + canvas.setCurrentElement(canvas.getDocumentElement(e.currentTarget), {caretTo: false}); }); var observer = new MutationObserver(function(mutations) { @@ -221,8 +221,8 @@ $.extend(Canvas.prototype, { 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(); @@ -230,8 +230,8 @@ $.extend(Canvas.prototype, { 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(); -- 2.20.1