X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/4f68cdcc12eb61a0061fc1a3b143ea5fa4f77310..b65f1bbd3863db4164c3b7283e187460ccdf2504:/modules/documentCanvas/canvas/canvas.js?ds=inline diff --git a/modules/documentCanvas/canvas/canvas.js b/modules/documentCanvas/canvas/canvas.js index 6179b83..6f4e089 100644 --- a/modules/documentCanvas/canvas/canvas.js +++ b/modules/documentCanvas/canvas/canvas.js @@ -321,19 +321,9 @@ $.extend(Canvas.prototype, { list: {}, - - - highlightElement: function(element) { - this.wrapper.find('.highlighted-element').removeClass('highlighted-element'); - element.dom().addClass('highlighted-element'); - }, - - dimElement: function(element) { - element.dom().removeClass('highlighted-element'); - }, getCurrentNodeElement: function() { - return this.getDocumentElement(this.wrapper.find('.current-node-element')[0]); + return this.getDocumentElement(this.wrapper.find('.current-node-element').parent()[0]); }, getCurrentTextElement: function() { @@ -361,7 +351,7 @@ $.extend(Canvas.prototype, { element.dom().addClass('current-text-element'); } else { this.wrapper.find('.current-node-element').removeClass('current-node-element') - element.dom().addClass('current-node-element'); + element._container().addClass('current-node-element'); this.publisher('currentElementChanged', element); } }.bind(this);