X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5be499ab63f91b65065fe34f3a6d645efc9ae7b6..2910a0ca2067aee9b747bb3c8776b97a8f248c25:/modules/nodeFamilyTree/nodeFamilyTree.js 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;