- jumpToDocumentElement: function(element) {
- sandbox.getModule('documentCanvas').jumpToElement(element);
- },
- updateCurrentNodeElement: function(nodeElement) {
- sandbox.getModule('nodePane').setNodeElement(nodeElement);
- //sandbox.getModule('nodeFamilyTree').setElement(nodeElement);
- //sandbox.getModule('nodeBreadCrumbs').setNodeElement(nodeElement);
- },
- updateCurrentTextElement: function(textElement) {
- sandbox.getModule('nodeFamilyTree').setElement(textElement);
- },
- resetDocument: function(document, reason) {
- var modules = [];
- if(reason === 'source_edit')
- modules = ['documentCanvas', 'metadataEditor'];
- else if (reason === 'edit')
- modules = ['sourceEditor'];
- else if (reason === 'revert')
- modules = ['documentCanvas', 'metadataEditor', 'sourceEditor'];
-
- modules.forEach(function(moduleName) {
- sandbox.getModule(moduleName).setDocument(document);
- });
- }