X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5be499ab63f91b65065fe34f3a6d645efc9ae7b6..3501d4ca6ca516663162da0cd2bd1e12b8491450:/modules/nodeBreadCrumbs/nodeBreadCrumbs.js diff --git a/modules/nodeBreadCrumbs/nodeBreadCrumbs.js b/modules/nodeBreadCrumbs/nodeBreadCrumbs.js index cefe7b4..517f45b 100644 --- a/modules/nodeBreadCrumbs/nodeBreadCrumbs.js +++ b/modules/nodeBreadCrumbs/nodeBreadCrumbs.js @@ -31,6 +31,7 @@ return function(sandbox) { setNode: function(node) { this.dom.empty(); var nodes = this.nodes = {}; + this.currentNode = node; this.nodes[node.id] = node; var parents = node.parents(); parents.each(function() { @@ -53,7 +54,11 @@ return function(sandbox) { return { start: function() { sandbox.publish('ready'); }, getView: function() { return view.dom; }, - setNode: function(node) { view.setNode(node); }, + setNode: function(wlxmlNode) { + if(!wlxmlNode.is(view.currentNode)) { + view.setNode(wlxmlNode); + } + }, highlightNode: function(id) { view.highlightNode(id); }, dimNode: function(id) { view.dimNode(id); } }