From a22a16b500c26f17a1269dc42517f05d4dbdbdb7 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 28 Jun 2018 11:58:58 +0200 Subject: [PATCH] Scales Folder --- Project.njsproj | 3 ++- ChartGrid.js => Scales/ChartGrid.js | 36 ++++++++++++++++++++++++++++- Scripts/AppLoader.js | 4 +++- server.js | 6 +++++ 4 files changed, 46 insertions(+), 3 deletions(-) rename ChartGrid.js => Scales/ChartGrid.js (96%) diff --git a/Project.njsproj b/Project.njsproj index 6867d949b..e60790bf5 100644 --- a/Project.njsproj +++ b/Project.njsproj @@ -169,7 +169,7 @@ - + @@ -211,6 +211,7 @@ + diff --git a/ChartGrid.js b/Scales/ChartGrid.js similarity index 96% rename from ChartGrid.js rename to Scales/ChartGrid.js index 1c7e0284f..fd8cea146 100644 --- a/ChartGrid.js +++ b/Scales/ChartGrid.js @@ -1,11 +1,45 @@ function newChartGrid() { let thisObject = { - draw: draw + container: undefined, + draw: draw, + getContainer: getContainer, }; + let container = newContainer(); + container.initialize(); + thisObject.container = container; + + thisObject.container.frame.width = 200; + thisObject.container.frame.height = TOP_SPACE_HEIGHT; + + container.frame.position.x = viewPort.visibleArea.topRight.x - thisObject.container.frame.width * 3; + container.frame.position.y = 0; + + container.isDraggeable = false; + container.isClickeable = true; + return thisObject; + function getContainer(point) { + + let container; + + /* First we check if this point is inside this object UI. */ + + if (thisObject.container.frame.isThisPointHere(point, true) === true) { + + return this.container; + + } else { + + /* This point does not belong to this space. */ + + return undefined; + } + + } + function draw(container, timeLineCoordinateSystem) { rightScaleBackground(); diff --git a/Scripts/AppLoader.js b/Scripts/AppLoader.js index dc2806a4d..0a3312d35 100644 --- a/Scripts/AppLoader.js +++ b/Scripts/AppLoader.js @@ -68,6 +68,8 @@ "CloudVM/WebFS.js", "CloudVM/CloudVM.js", + "Scales/ChartGrid.js", + "BreakpointsBar.js", "Plotter.js", "PlotterPanel.js", @@ -90,7 +92,7 @@ "VolumeBar.js", "ChartUtilities.js", "TimelineChart.js", - "ChartGrid.js", + "Animation.js", "Container.js", diff --git a/server.js b/server.js index ab76d9919..032ab64c1 100644 --- a/server.js +++ b/server.js @@ -845,6 +845,12 @@ function onBrowserRequest(request, response) { } break; + case "Scales": + { + respondWithFile('./' + requestParameters[1] + '/' + requestParameters[2], response); + } + break; + case "Files": { respondWithFile('./' + requestParameters[1] + '/' + requestParameters[2], response);