Integrating new canvas api into rest of the modules
[fnpeditor.git] / modules / nodeFamilyTree / nodeFamilyTree.js
index 7415b2d..b5cb56e 100644 (file)
@@ -37,26 +37,26 @@ return function(sandbox) {
             \r
             if(parentNode) {\r
                 parent = {\r
             \r
             if(parentNode) {\r
                 parent = {\r
-                    repr: parentNode.tag + (parentNode.klass ? ' / ' + parentNode.klass : ''),\r
-                    id: parentNode.id\r
+                    repr: parentNode.getTag() + (parentNode.getClass() ? ' / ' + parentNode.getClass() : ''),\r
+                    id: parentNode.getId()\r
                 };\r
                 };\r
-                this.nodes[parentNode.id] = parentNode;\r
+                this.nodes[parentNode.getId()] = parentNode;\r
             }\r
         \r
             var children = [];\r
             node.children().each(function() {\r
                 var child = this;\r
             }\r
         \r
             var children = [];\r
             node.children().each(function() {\r
                 var child = this;\r
-                children.push({repr: child.tag + (child.klass ? ' / ' + child.klass : ''), id: child.id});\r
-                nodes[child.id] = child;\r
+                children.push({repr: child.getTag() + (child.getClass() ? ' / ' + child.getClass() : ''), id: child.getId()});\r
+                nodes[child.getId()] = child;\r
             });\r
             this.dom.empty();\r
             this.dom.append($(template({parent: parent, children: children})));\r
         },\r
             });\r
             this.dom.empty();\r
             this.dom.append($(template({parent: parent, children: children})));\r
         },\r
-        highlightNode: function(wlxmlNode) {\r
-            this.dom.find('a[data-id="'+wlxmlNode.id+'"]').addClass('rng-common-hoveredNode');\r
+        highlightNode: function(canvasNode) {\r
+            this.dom.find('a[data-id="'+canvasNode.getId()+'"]').addClass('rng-common-hoveredNode');\r
         },\r
         },\r
-        dimNode: function(wlxmlNode) {\r
-            this.dom.find('a[data-id="'+wlxmlNode.id+'"]').removeClass('rng-common-hoveredNode');\r
+        dimNode: function(canvasNode) {\r
+            this.dom.find('a[data-id="'+canvasNode.getId()+'"]').removeClass('rng-common-hoveredNode');\r
         }\r
     }\r
     \r
         }\r
     }\r
     \r
@@ -66,18 +66,18 @@ return function(sandbox) {
         start: function() {\r
             sandbox.publish('ready');\r
         },\r
         start: function() {\r
             sandbox.publish('ready');\r
         },\r
-        setNode: function(wlxmlNode) {\r
-            if(!wlxmlNode.is(view.currentNode))\r
-                view.setNode(wlxmlNode);\r
+        setNode: function(canvasNode) {\r
+            if(!canvasNode.isSame(view.currentNode))\r
+                view.setNode(canvasNode);\r
         },\r
         getView: function() {\r
             return view.dom;\r
         },\r
         },\r
         getView: function() {\r
             return view.dom;\r
         },\r
-        highlightNode: function(wlxmlNode) {\r
-            view.highlightNode(wlxmlNode);\r
+        highlightNode: function(canvasNode) {\r
+            view.highlightNode(canvasNode);\r
         },\r
         },\r
-        dimNode: function(wlxmlNode) {\r
-            view.dimNode(wlxmlNode);\r
+        dimNode: function(canvasNode) {\r
+            view.dimNode(canvasNode);\r
         }\r
     };\r
 };\r
         }\r
     };\r
 };\r