Highlighting nodes in nodeFamilyTree
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 6 Jun 2013 11:18:17 +0000 (13:18 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 6 Jun 2013 11:18:17 +0000 (13:18 +0200)
modules/nodeFamilyTree/nodeFamilyTree.js
modules/rng/rng.js

index 68ab8f0..bd9c42c 100644 (file)
@@ -55,6 +55,12 @@ return function(sandbox) {
         },\r
         getView: function() {\r
             return view.dom;\r
+        },\r
+        highlightNode: function(id) {\r
+            view.dom.find('a[data-id="'+id+'"]').addClass('rng-hover');\r
+        },\r
+        dimNode: function(id) {\r
+            view.dom.find('a[data-id="'+id+'"]').removeClass('rng-hover');\r
         }\r
     };\r
 };\r
index 09e1b90..a48535c 100644 (file)
@@ -112,11 +112,11 @@ return function(sandbox) {
         },\r
         \r
         nodeHovered: function(node) {\r
-            \r
+            sandbox.getModule('nodeFamilyTree').highlightNode(node.attr('id'));\r
         },\r
         \r
         nodeBlured: function(node) {\r
-        \r
+            sandbox.getModule('nodeFamilyTree').dimNode(node.attr('id'));\r
         }\r
     };\r
 \r