Moving sourceEditor module to its own directory with its own styles
[fnpeditor.git] / modules / rng / rng.js
index 09e1b90..0322ca2 100644 (file)
@@ -54,7 +54,7 @@ return function(sandbox) {
         ready: function() {\r
             views.mainLayout.setView('mainView', views.mainTabs.getAsView());\r
             \r
         ready: function() {\r
             views.mainLayout.setView('mainView', views.mainTabs.getAsView());\r
             \r
-            _.each(['visualEditor', 'sourceEditor', 'documentCanvas', 'documentToolbar', 'nodePane', 'metadataEditor', 'nodeFamilyTree', 'mainBar', 'indicator'], function(moduleName) {\r
+            _.each(['visualEditor', 'sourceEditor', 'documentCanvas', 'documentToolbar', 'nodePane', 'metadataEditor', 'nodeFamilyTree', 'nodeBreadCrumbs', 'mainBar', 'indicator'], function(moduleName) {\r
                 sandbox.getModule(moduleName).start();\r
             });\r
         },\r
                 sandbox.getModule(moduleName).start();\r
             });\r
         },\r
@@ -105,6 +105,7 @@ return function(sandbox) {
         nodeSelected: function(node) {\r
             sandbox.getModule('nodePane').setNode(node);\r
             sandbox.getModule('nodeFamilyTree').setNode(node);\r
         nodeSelected: function(node) {\r
             sandbox.getModule('nodePane').setNode(node);\r
             sandbox.getModule('nodeFamilyTree').setNode(node);\r
+            sandbox.getModule('nodeBreadCrumbs').setNode(node);\r
         },\r
         \r
         contentChanged: function() {\r
         },\r
         \r
         contentChanged: function() {\r
@@ -112,11 +113,16 @@ return function(sandbox) {
         },\r
         \r
         nodeHovered: function(node) {\r
         },\r
         \r
         nodeHovered: function(node) {\r
+            sandbox.getModule('documentCanvas').highlightNode(node.attr('id'));\r
+            sandbox.getModule('nodeFamilyTree').highlightNode(node.attr('id'));\r
+            sandbox.getModule('nodeBreadCrumbs').highlightNode(node.attr('id'));\r
             \r
         },\r
         \r
         nodeBlured: function(node) {\r
             \r
         },\r
         \r
         nodeBlured: function(node) {\r
-        \r
+            sandbox.getModule('documentCanvas').dimNode(node.attr('id'));\r
+            sandbox.getModule('nodeFamilyTree').dimNode(node.attr('id'));\r
+            sandbox.getModule('nodeBreadCrumbs').dimNode(node.attr('id'));\r
         }\r
     };\r
 \r
         }\r
     };\r
 \r
@@ -166,6 +172,21 @@ return function(sandbox) {
                 sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r
             }\r
         }\r
                 sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r
             }\r
         }\r
+    };\r
+    \r
+    eventHandlers.nodeBreadCrumbs = {\r
+        ready: function() {\r
+            views.visualEditing.setView('statusBar', sandbox.getModule('nodeBreadCrumbs').getView());\r
+        },\r
+        nodeHighlighted: function(id) {\r
+            sandbox.getModule('documentCanvas').highlightNode(id);\r
+        },\r
+        nodeDimmed: function(id) {\r
+            sandbox.getModule('documentCanvas').dimNode(id);\r
+        },\r
+        nodeSelected: function(id) {\r
+            sandbox.getModule('documentCanvas').selectNode(id);\r
+        }        \r
     }\r
     \r
     /* api */\r
     }\r
     \r
     /* api */\r