From 33eaa60f532ad277462a449e588cf26f19f0cd71 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sun, 18 Oct 2020 11:35:19 +0200 Subject: [PATCH] Spaces Reorganized --- Canvas.js | 20 +++++++++---------- {Spaces => ChartingSpace}/ChartingSpace.js | 0 ChartingSpace/PlottersManager.js | 8 ++++---- ChartingSpace/TimeMachine.js | 12 +++++------ ChartingSpace/TimelineChart.js | 6 +++--- {Spaces => ChatSpace}/ChatSpace.js | 0 {Spaces => CockpitSpace}/CockpitSpace.js | 4 ++-- {Spaces => DesignSpace}/DesignSpace.js | 0 DesignSpace/{Workspace => }/Workspace.js | 0 {Spaces => DocSpace}/DocSpace.js | 0 {Spaces => FloatingSpace}/FloatingSpace.js | 0 {Panels => PanelSpace}/Layer.js | 0 {Panels => PanelSpace}/LayersPanel.js | 0 {Panels => PanelSpace}/LeftRightButton.js | 0 .../PanelSpace.js | 2 +- {Panels => PanelSpace}/PanelsVisibleButton.js | 2 +- {Panels => PanelSpace}/PlotterPanel.js | 0 {Panels => PanelSpace}/UpDownButton.js | 0 {Spaces => SideSpace}/SideSpace.js | 0 {Spaces => TopSpace}/TopSpace.js | 0 {Spaces => TutorialSpace}/TutorialSpace.js | 0 21 files changed, 27 insertions(+), 27 deletions(-) rename {Spaces => ChartingSpace}/ChartingSpace.js (100%) rename {Spaces => ChatSpace}/ChatSpace.js (100%) rename {Spaces => CockpitSpace}/CockpitSpace.js (99%) rename {Spaces => DesignSpace}/DesignSpace.js (100%) rename DesignSpace/{Workspace => }/Workspace.js (100%) rename {Spaces => DocSpace}/DocSpace.js (100%) rename {Spaces => FloatingSpace}/FloatingSpace.js (100%) rename {Panels => PanelSpace}/Layer.js (100%) rename {Panels => PanelSpace}/LayersPanel.js (100%) rename {Panels => PanelSpace}/LeftRightButton.js (100%) rename Spaces/PanelsSpace.js => PanelSpace/PanelSpace.js (99%) rename {Panels => PanelSpace}/PanelsVisibleButton.js (97%) rename {Panels => PanelSpace}/PlotterPanel.js (100%) rename {Panels => PanelSpace}/UpDownButton.js (100%) rename {Spaces => SideSpace}/SideSpace.js (100%) rename {Spaces => TopSpace}/TopSpace.js (100%) rename {Spaces => TutorialSpace}/TutorialSpace.js (100%) diff --git a/Canvas.js b/Canvas.js index adf250ab3..e5b9750c2 100644 --- a/Canvas.js +++ b/Canvas.js @@ -33,7 +33,7 @@ function newCanvas() { tutorialSpace: undefined, chartingSpace: undefined, floatingSpace: undefined, - panelsSpace: undefined, + panelSpace: undefined, cockpitSpace: undefined, designSpace: undefined, animation: undefined, @@ -115,8 +115,8 @@ function newCanvas() { thisObject.designSpace = newDesignSpace() thisObject.designSpace.initialize() - thisObject.panelsSpace = newPanelsSpace() - thisObject.panelsSpace.initialize() + thisObject.panelSpace = newPanelSpace() + thisObject.panelSpace.initialize() thisObject.chartingSpace = newChartingSpace() thisObject.chartingSpace.initialize() @@ -143,7 +143,7 @@ function newCanvas() { animation.addCallBackFunction('Floating Space Physics', thisObject.floatingSpace.physics) animation.addCallBackFunction('Charting Space Physics', thisObject.chartingSpace.physics) animation.addCallBackFunction('Design Space Physics', thisObject.designSpace.physics) - animation.addCallBackFunction('Panels Space Physics', thisObject.panelsSpace.physics) + animation.addCallBackFunction('Panels Space Physics', thisObject.panelSpace.physics) animation.addCallBackFunction('Side Space Physics', thisObject.sideSpace.physics) animation.addCallBackFunction('Doc Space Physics', thisObject.docSpace.physics) //animation.addCallBackFunction('Chat Space Physics', thisObject.chatSpace.physics) @@ -152,7 +152,7 @@ function newCanvas() { /* Spcaces Drawing */ animation.addCallBackFunction('Floating Space Draw', thisObject.floatingSpace.draw) animation.addCallBackFunction('Charting Space Draw', thisObject.chartingSpace.draw) - animation.addCallBackFunction('Panels Space', thisObject.panelsSpace.draw) + animation.addCallBackFunction('Panels Space', thisObject.panelSpace.draw) animation.addCallBackFunction('CockpitSpace Draw', thisObject.cockpitSpace.draw) animation.addCallBackFunction('Design Space Draw', thisObject.designSpace.draw) animation.addCallBackFunction('Top Space Draw', thisObject.topSpace.draw) @@ -730,7 +730,7 @@ function newCanvas() { } /* We check if the mouse is over a panel/ */ - container = thisObject.panelsSpace.getContainer(point, GET_CONTAINER_PURPOSE.DRAGGING) + container = thisObject.panelSpace.getContainer(point, GET_CONTAINER_PURPOSE.DRAGGING) if (container !== undefined && event.shiftKey === false) { if (container.isDraggeable === true) { @@ -860,7 +860,7 @@ function newCanvas() { } /* We check if the mouse is over a panel/ */ - container = thisObject.panelsSpace.getContainer(point, GET_CONTAINER_PURPOSE.MOUSE_CLICK) + container = thisObject.panelSpace.getContainer(point, GET_CONTAINER_PURPOSE.MOUSE_CLICK) if (container !== undefined && container.isClickeable === true) { container.eventHandler.raiseEvent('onMouseClick', point) @@ -1040,8 +1040,8 @@ function newCanvas() { } /* We check if the mouse is over a panel/ */ - if (thisObject.panelsSpace !== undefined) { - container = thisObject.panelsSpace.getContainer(point, GET_CONTAINER_PURPOSE.MOUSE_OVER) + if (thisObject.panelSpace !== undefined) { + container = thisObject.panelSpace.getContainer(point, GET_CONTAINER_PURPOSE.MOUSE_OVER) if (container !== undefined && container.detectMouseOver === true) { containerFound() @@ -1140,7 +1140,7 @@ function newCanvas() { } /* Panel Space */ - container = canvas.panelsSpace.getContainer({ x: point.x, y: point.y }) + container = canvas.panelSpace.getContainer({ x: point.x, y: point.y }) if (container !== undefined && container.isWheelable === true) { container.eventHandler.raiseEvent('onMouseWheel', event) diff --git a/Spaces/ChartingSpace.js b/ChartingSpace/ChartingSpace.js similarity index 100% rename from Spaces/ChartingSpace.js rename to ChartingSpace/ChartingSpace.js diff --git a/ChartingSpace/PlottersManager.js b/ChartingSpace/PlottersManager.js index e7f894c75..04c6491a7 100644 --- a/ChartingSpace/PlottersManager.js +++ b/ChartingSpace/PlottersManager.js @@ -44,7 +44,7 @@ function newPlottersManager() { let connector = thisObject.connectors[i] /* Then the panels. */ for (let j = 0; j < connector.panels.length; j++) { - canvas.panelsSpace.destroyPanel(connector.panels[j]) + canvas.panelSpace.destroyPanel(connector.panels[j]) connector.panels[j] = undefined } connector.panels = undefined @@ -224,8 +224,8 @@ function newPlottersManager() { } let owner = thisObject.payload.node.payload.parentNode.id // Panels are owned by the time machine. - let plotterPanelHandle = canvas.panelsSpace.createNewPanel('Plotter Panel', parameters, owner, layer.session) - let plotterPanel = canvas.panelsSpace.getPanel(plotterPanelHandle) + let plotterPanelHandle = canvas.panelSpace.createNewPanel('Plotter Panel', parameters, owner, layer.session) + let plotterPanel = canvas.panelSpace.getPanel(plotterPanelHandle) /* Connect Panel to the Plotter via an Event. */ connector.plotter.onRecordChangeEventsSubscriptionId = connector.plotter.container.eventHandler.listenToEvent('Current Record Changed', plotterPanel.onRecordChange) @@ -384,7 +384,7 @@ function newPlottersManager() { if (connector.layer.payload.node.id === layer.payload.node.id) { /* Then the panels. */ for (let j = 0; j < connector.panels.length; j++) { - canvas.panelsSpace.destroyPanel(connector.panels[j]) + canvas.panelSpace.destroyPanel(connector.panels[j]) } /* Finally the Storage Objects */ finalizeNodesPlotting(connector) diff --git a/ChartingSpace/TimeMachine.js b/ChartingSpace/TimeMachine.js index b367420ac..351995be4 100644 --- a/ChartingSpace/TimeMachine.js +++ b/ChartingSpace/TimeMachine.js @@ -433,8 +433,8 @@ function newTimeMachine() { if ( thisObject.container.frame.isInViewPort() && canvas.chartingSpace.viewport.zoomLevel >= ZOOM_OUT_THRESHOLD_FOR_NOT_HIDDING_PANELS) { - canvas.panelsSpace.unHide(thisObject.payload.node.id, 'Layers Panel') - canvas.panelsSpace.unHide(thisObject.payload.node.id, 'Plotter Panel') + canvas.panelSpace.unHide(thisObject.payload.node.id, 'Layers Panel') + canvas.panelSpace.unHide(thisObject.payload.node.id, 'Plotter Panel') return } @@ -442,11 +442,11 @@ function newTimeMachine() { thisObject.container.frame.isCenterInViewPort() && canvas.chartingSpace.viewport.zoomLevel >= ZOOM_OUT_THRESHOLD_FOR_HIDDING_PANELS ) { - canvas.panelsSpace.unHide(thisObject.payload.node.id, 'Layers Panel') - canvas.panelsSpace.unHide(thisObject.payload.node.id, 'Plotter Panel') + canvas.panelSpace.unHide(thisObject.payload.node.id, 'Layers Panel') + canvas.panelSpace.unHide(thisObject.payload.node.id, 'Plotter Panel') } else { - canvas.panelsSpace.hide(thisObject.payload.node.id, 'Layers Panel') - canvas.panelsSpace.hide(thisObject.payload.node.id, 'Plotter Panel') + canvas.panelSpace.hide(thisObject.payload.node.id, 'Layers Panel') + canvas.panelSpace.hide(thisObject.payload.node.id, 'Plotter Panel') } } diff --git a/ChartingSpace/TimelineChart.js b/ChartingSpace/TimelineChart.js index ccc30ce56..d7346f7b8 100644 --- a/ChartingSpace/TimelineChart.js +++ b/ChartingSpace/TimelineChart.js @@ -100,7 +100,7 @@ function newTimelineChart() { thisObject.plotterManager = undefined thisObject.layerManager = undefined - canvas.panelsSpace.destroyPanel(layersPanelHandle) + canvas.panelSpace.destroyPanel(layersPanelHandle) } function finalizeTimeFrameScale() { @@ -173,8 +173,8 @@ function newTimelineChart() { function initializeLayerManager() { let owner = thisObject.payload.node.payload.parentNode.id // The real owner is the Time Machine - layersPanelHandle = canvas.panelsSpace.createNewPanel('Layers Panel', undefined, owner) - thisObject.layerManager = canvas.panelsSpace.getPanel(layersPanelHandle) + layersPanelHandle = canvas.panelSpace.createNewPanel('Layers Panel', undefined, owner) + thisObject.layerManager = canvas.panelSpace.getPanel(layersPanelHandle) thisObject.layerManager.payload = thisObject.payload.node.layerManager.payload thisObject.layerManager.initialize() diff --git a/Spaces/ChatSpace.js b/ChatSpace/ChatSpace.js similarity index 100% rename from Spaces/ChatSpace.js rename to ChatSpace/ChatSpace.js diff --git a/Spaces/CockpitSpace.js b/CockpitSpace/CockpitSpace.js similarity index 99% rename from Spaces/CockpitSpace.js rename to CockpitSpace/CockpitSpace.js index fe16fc4b9..2b7670e0f 100644 --- a/Spaces/CockpitSpace.js +++ b/CockpitSpace/CockpitSpace.js @@ -177,9 +177,9 @@ function newCockpitSpace() { if (thisObject.container.frame.position.y < browserCanvas.height * 0.5 / 100 + TOP_SPACE_HEIGHT) { thisObject.container.frame.position.y = TOP_SPACE_HEIGHT thisObject.status = 'TOP' - canvas.panelsSpace.visible = false + canvas.panelSpace.visible = false } else { - canvas.panelsSpace.visible = true + canvas.panelSpace.visible = true } COCKPIT_SPACE_POSITION = thisObject.container.frame.position.y diff --git a/Spaces/DesignSpace.js b/DesignSpace/DesignSpace.js similarity index 100% rename from Spaces/DesignSpace.js rename to DesignSpace/DesignSpace.js diff --git a/DesignSpace/Workspace/Workspace.js b/DesignSpace/Workspace.js similarity index 100% rename from DesignSpace/Workspace/Workspace.js rename to DesignSpace/Workspace.js diff --git a/Spaces/DocSpace.js b/DocSpace/DocSpace.js similarity index 100% rename from Spaces/DocSpace.js rename to DocSpace/DocSpace.js diff --git a/Spaces/FloatingSpace.js b/FloatingSpace/FloatingSpace.js similarity index 100% rename from Spaces/FloatingSpace.js rename to FloatingSpace/FloatingSpace.js diff --git a/Panels/Layer.js b/PanelSpace/Layer.js similarity index 100% rename from Panels/Layer.js rename to PanelSpace/Layer.js diff --git a/Panels/LayersPanel.js b/PanelSpace/LayersPanel.js similarity index 100% rename from Panels/LayersPanel.js rename to PanelSpace/LayersPanel.js diff --git a/Panels/LeftRightButton.js b/PanelSpace/LeftRightButton.js similarity index 100% rename from Panels/LeftRightButton.js rename to PanelSpace/LeftRightButton.js diff --git a/Spaces/PanelsSpace.js b/PanelSpace/PanelSpace.js similarity index 99% rename from Spaces/PanelsSpace.js rename to PanelSpace/PanelSpace.js index be5b6e6ad..8b5a0c2c6 100644 --- a/Spaces/PanelsSpace.js +++ b/PanelSpace/PanelSpace.js @@ -4,7 +4,7 @@ The Panel Space y the place wehre all panels live, no matter who create them. */ -function newPanelsSpace() { +function newPanelSpace() { let thisObject = { visible: true, container: undefined, diff --git a/Panels/PanelsVisibleButton.js b/PanelSpace/PanelsVisibleButton.js similarity index 97% rename from Panels/PanelsVisibleButton.js rename to PanelSpace/PanelsVisibleButton.js index 98eac86df..a016bcb64 100644 --- a/Panels/PanelsVisibleButton.js +++ b/PanelSpace/PanelsVisibleButton.js @@ -60,7 +60,7 @@ function newPanelsVisibleButton() { function setPanelVisibility() { for (let i = 0; i < thisObject.panels.length; i++) { - let panel = canvas.panelsSpace.getPanel(thisObject.panels[i]) + let panel = canvas.panelSpace.getPanel(thisObject.panels[i]) panel.isVisible = thisObject.showPanels } } diff --git a/Panels/PlotterPanel.js b/PanelSpace/PlotterPanel.js similarity index 100% rename from Panels/PlotterPanel.js rename to PanelSpace/PlotterPanel.js diff --git a/Panels/UpDownButton.js b/PanelSpace/UpDownButton.js similarity index 100% rename from Panels/UpDownButton.js rename to PanelSpace/UpDownButton.js diff --git a/Spaces/SideSpace.js b/SideSpace/SideSpace.js similarity index 100% rename from Spaces/SideSpace.js rename to SideSpace/SideSpace.js diff --git a/Spaces/TopSpace.js b/TopSpace/TopSpace.js similarity index 100% rename from Spaces/TopSpace.js rename to TopSpace/TopSpace.js diff --git a/Spaces/TutorialSpace.js b/TutorialSpace/TutorialSpace.js similarity index 100% rename from Spaces/TutorialSpace.js rename to TutorialSpace/TutorialSpace.js