X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5be499ab63f91b65065fe34f3a6d645efc9ae7b6..dcbcc948a5d3044fee2839dbe508ab1eb4ba54dc:/modules/nodeBreadCrumbs/nodeBreadCrumbs.js?ds=sidebyside 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); } }