X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b58b8f498d9b5e70aec099829b97af2c4d72da10..ccd0a4f745a6fab17a228d822e80d8bbb6fa7d5d:/modules/rng/rng.js?ds=inline diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 09e1b90..0322ca2 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -54,7 +54,7 @@ return function(sandbox) { ready: function() { views.mainLayout.setView('mainView', views.mainTabs.getAsView()); - _.each(['visualEditor', 'sourceEditor', 'documentCanvas', 'documentToolbar', 'nodePane', 'metadataEditor', 'nodeFamilyTree', 'mainBar', 'indicator'], function(moduleName) { + _.each(['visualEditor', 'sourceEditor', 'documentCanvas', 'documentToolbar', 'nodePane', 'metadataEditor', 'nodeFamilyTree', 'nodeBreadCrumbs', 'mainBar', 'indicator'], function(moduleName) { sandbox.getModule(moduleName).start(); }); }, @@ -105,6 +105,7 @@ return function(sandbox) { nodeSelected: function(node) { sandbox.getModule('nodePane').setNode(node); sandbox.getModule('nodeFamilyTree').setNode(node); + sandbox.getModule('nodeBreadCrumbs').setNode(node); }, contentChanged: function() { @@ -112,11 +113,16 @@ return function(sandbox) { }, nodeHovered: function(node) { + sandbox.getModule('documentCanvas').highlightNode(node.attr('id')); + sandbox.getModule('nodeFamilyTree').highlightNode(node.attr('id')); + sandbox.getModule('nodeBreadCrumbs').highlightNode(node.attr('id')); }, nodeBlured: function(node) { - + sandbox.getModule('documentCanvas').dimNode(node.attr('id')); + sandbox.getModule('nodeFamilyTree').dimNode(node.attr('id')); + sandbox.getModule('nodeBreadCrumbs').dimNode(node.attr('id')); } }; @@ -166,6 +172,21 @@ return function(sandbox) { sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass); } } + }; + + eventHandlers.nodeBreadCrumbs = { + ready: function() { + views.visualEditing.setView('statusBar', sandbox.getModule('nodeBreadCrumbs').getView()); + }, + nodeHighlighted: function(id) { + sandbox.getModule('documentCanvas').highlightNode(id); + }, + nodeDimmed: function(id) { + sandbox.getModule('documentCanvas').dimNode(id); + }, + nodeSelected: function(id) { + sandbox.getModule('documentCanvas').selectNode(id); + } } /* api */