X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5be499ab63f91b65065fe34f3a6d645efc9ae7b6..6384a81fa481cb43fddca23742e37761592be66d:/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;