From: Aleksander Ɓukasz Date: Thu, 17 Apr 2014 14:46:22 +0000 (+0200) Subject: editor: remove unused code X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/4ab522037ab350b3f0257130bc6e4dbc6f183021?ds=sidebyside editor: remove unused code --- diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index b91c3c1..27160e7 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -47,10 +47,6 @@ $.extend(DocumentElement.prototype, { return other && (typeof other === typeof this) && other.dom()[0] === this.dom()[0]; }, - markAsCurrent: function() { - this.canvas.markAsCurrent(this); - }, - getVerticallyFirstTextElement: function() { var toret; this.children().some(function(child) { diff --git a/src/editor/modules/documentCanvas/documentCanvas.js b/src/editor/modules/documentCanvas/documentCanvas.js index 0a31114..6015089 100644 --- a/src/editor/modules/documentCanvas/documentCanvas.js +++ b/src/editor/modules/documentCanvas/documentCanvas.js @@ -41,15 +41,6 @@ return function(sandbox) { canvas.loadWlxmlDocument(wlxmlDocument); canvasWrapper.find('#rng-module-documentCanvas-content').empty().append(canvas.view()); }, - modifyCurrentNodeElement: function(attr, value) { - var currentNodeElement = canvas.getCurrentNodeElement(); - if(attr === 'class' || attr === 'tag') { - currentNodeElement['setWlxml'+(attr[0].toUpperCase() + attr.substring(1))](value); - } else { - currentNodeElement.setWlxmlMetaAttr(attr, value); - } - sandbox.publish('currentNodeElementChanged', currentNodeElement); - }, highlightElement: function(node) { canvas.toggleElementHighlight(node, true); }, diff --git a/src/editor/modules/rng/rng.js b/src/editor/modules/rng/rng.js index c9514f8..b12c19f 100644 --- a/src/editor/modules/rng/rng.js +++ b/src/editor/modules/rng/rng.js @@ -220,10 +220,6 @@ return function(sandbox) { eventHandlers.nodePane = { ready: function() { views.currentNodePaneLayout.appendView(sandbox.getModule('nodePane').getView()); - }, - - nodeElementChange: function(attr, value) { - sandbox.getModule('documentCanvas').modifyCurrentNodeElement(attr, value); } };