X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5be499ab63f91b65065fe34f3a6d645efc9ae7b6..3ef4adb18d58aa2570142c19762e4f2a48cb0d1b:/modules/nodeFamilyTree/nodeFamilyTree.js?ds=sidebyside diff --git a/modules/nodeFamilyTree/nodeFamilyTree.js b/modules/nodeFamilyTree/nodeFamilyTree.js index 3c78bd1..7415b2d 100644 --- a/modules/nodeFamilyTree/nodeFamilyTree.js +++ b/modules/nodeFamilyTree/nodeFamilyTree.js @@ -31,6 +31,7 @@ return function(sandbox) { setNode: function(node) { console.log('familyTree sets node'); var nodes = this.nodes = {}; + this.currentNode = node; var parentNode = node.parent(); var parent = undefined; @@ -65,8 +66,9 @@ return function(sandbox) { start: function() { sandbox.publish('ready'); }, - setNode: function(node) { - view.setNode(node); + setNode: function(wlxmlNode) { + if(!wlxmlNode.is(view.currentNode)) + view.setNode(wlxmlNode); }, getView: function() { return view.dom;