integration wip: saving document
[fnpeditor.git] / src / editor / modules / rng / rng.js
index a25136a..d4fa434 100644 (file)
@@ -18,14 +18,14 @@ return function(sandbox) {
     var commands = {
         highlightDocumentElement: function(element, origin) {
             ///'nodeBreadCrumbs', 'nodeFamilyTree'
-            ['documentCanvas', ].forEach(function(moduleName) {
+            ['documentCanvas', 'nodeFamilyTree'].forEach(function(moduleName) {
                 if(!origin || moduleName != origin)
                     sandbox.getModule(moduleName).highlightElement(element);
             });
         },
         dimDocumentElement: function(element, origin) {
             //'nodeBreadCrumbs', 'nodeFamilyTree'
-            ['documentCanvas'].forEach(function(moduleName) {
+            ['documentCanvas', 'nodeFamilyTree'].forEach(function(moduleName) {
                 if(!origin || moduleName != origin)
                     sandbox.getModule(moduleName).dimElement(element);
             });
@@ -35,8 +35,8 @@ return function(sandbox) {
         },
         updateCurrentNodeElement: function(nodeElement) {
             sandbox.getModule('nodePane').setNodeElement(nodeElement);
-            //sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
-            //sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
+            sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
+            sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
         },
         updateCurrentTextElement: function(textElement) {
             sandbox.getModule('nodeFamilyTree').setElement(textElement);
@@ -130,7 +130,6 @@ return function(sandbox) {
             views.mainLayout.setView('topPanel', sandbox.getModule('mainBar').getView());
         },
         'cmd.save': function() {
-            synchronizeTab(views.mainTabs.getCurrentSlug());
             sandbox.getModule('data').saveDocument();
         }
     };
@@ -191,14 +190,14 @@ return function(sandbox) {
         ready: function() {
             views.currentNodePaneLayout.appendView(sandbox.getModule('nodeFamilyTree').getView());
         },
-        elementEntered: function(element) {
-            commands.highlightDocumentElement(element, 'nodeFamilyTree');
+        nodeEntered: function(node) {
+            commands.highlightDocumentElement(node, 'nodeFamilyTree');
         },
-        elementLeft: function(element) {
-            commands.dimDocumentElement(element, 'nodeFamilyTree');
+        nodeLeft: function(node) {
+            commands.dimDocumentElement(node, 'nodeFamilyTree');
         },
-        elementClicked: function(element) {
-            commands.jumpToDocumentElement(element);
+        nodeClicked: function(node) {
+            commands.jumpToDocumentElement(node);
         }
     };