- currentTextElementSet: function(textElement) {
- commands.updateCurrentTextElement(textElement);
- },
-
- currentNodeElementSet: function(nodeElement) {
- commands.updateCurrentNodeElement(nodeElement);
- },
-
- currentNodeElementChanged: function(nodeElement) {
- commands.updateCurrentNodeElement(nodeElement);
- dirty.documentCanvas = true;
- },
-
- contentChanged: function() {
- dirty.documentCanvas = true;
- },
-
- nodeHovered: function(canvasNode) {
- commands.highlightDocumentNode(canvasNode);
- },
-
- nodeBlured: function(canvasNode) {
- commands.dimDocumentNode(canvasNode);
- }
- };
-
- eventHandlers.nodePane = {
- ready: function() {
- views.currentNodePaneLayout.appendView(sandbox.getModule('nodePane').getView());
- },
-
- nodeElementChange: function(attr, value) {
- sandbox.getModule('documentCanvas').modifyCurrentNodeElement(attr, value);
- }
- };
-
- eventHandlers.metadataEditor = {
- ready: function() {
- sandbox.getModule('metadataEditor').setDocument(sandbox.getModule('data').getDocument());
- views.visualEditingSidebar.addTab({icon: 'info-sign'}, 'metadataEditor', sandbox.getModule('metadataEditor').getView());
- },
- metadataChanged: function(metadata) {
- dirty.metadataEditor = true;
- },
- metadataSet: function() {
- dirty.metadataEditor = false;
- },
- };
-
- eventHandlers.nodeFamilyTree = {
- ready: function() {
- views.currentNodePaneLayout.appendView(sandbox.getModule('nodeFamilyTree').getView());
- },
- elementEntered: function(element) {
- commands.highlightDocumentElement(element, 'nodeFamilyTree');
- },
- elementLeft: function(element) {
- commands.dimDocumentElement(element, 'nodeFamilyTree');
- },
- elementClicked: function(element) {
- commands.jumpToDocumentElement(element);