diff --git a/Scales/RightScale.js b/Scales/RightScale.js index 67d3ac758..8b24475fa 100644 --- a/Scales/RightScale.js +++ b/Scales/RightScale.js @@ -1,4 +1,11 @@ function newRigthScale () { + const MODULE_NAME = 'Right Scale' + const INFO_LOG = false + const INTENSIVE_LOG = false + const ERROR_LOG = true + const logger = newWebDebugLog() + logger.fileName = MODULE_NAME + let thisObject = { container: undefined, draw: draw, @@ -8,19 +15,18 @@ const RIGHT_MARGIN = 50 - let container = newContainer() - container.initialize() - thisObject.container = container + thisObject.container = newContainer() + thisObject.container.initialize(MODULE_NAME) thisObject.container.frame.width = RIGHT_MARGIN thisObject.container.frame.height = viewPort.visibleArea.bottomRight.y - viewPort.visibleArea.topRight.y - container.frame.position.x = viewPort.visibleArea.bottomRight.x - container.frame.position.y = TOP_SPACE_HEIGHT + thisObject.container.frame.position.x = viewPort.visibleArea.bottomRight.x + thisObject.container.frame.position.y = TOP_SPACE_HEIGHT - container.isDraggeable = false - container.isClickeable = false - container.isWheelable = true + thisObject.container.isDraggeable = false + thisObject.container.isClickeable = false + thisObject.container.isWheelable = true return thisObject @@ -43,7 +49,7 @@ /* First we check if this point is inside this object UI. */ if (thisObject.container.frame.isThisPointHere(point, true) === true) { - return this.container + return thisObject.container } else { /* This point does not belong to this space. */ diff --git a/TimeMachine.js b/TimeMachine.js index b89e5db04..8123b0369 100644 --- a/TimeMachine.js +++ b/TimeMachine.js @@ -191,6 +191,7 @@ function newTimeMachine () { } timeScale.draw() + rigthScale.draw() } function getContainer (point, purpose) { @@ -203,6 +204,13 @@ function newTimeMachine () { } } + container = rigthScale.getContainer(point) + if (container !== undefined) { + if (container.isForThisPurpose(purpose)) { + return container + } + } + for (let i = 0; i < this.charts.length; i++) { container = this.charts[i].getContainer(point) if (container !== undefined) { diff --git a/TimelineChart.js b/TimelineChart.js index 7d75c178b..5cc49fe9c 100644 --- a/TimelineChart.js +++ b/TimelineChart.js @@ -25,7 +25,7 @@ thisObject.container.initialize(MODULE_NAME) thisObject.container.detectMouseOver = true - let chartGrid + // let chartGrid let breakpointsBar let initializationReady = false @@ -116,8 +116,8 @@ logoExchange.src = window.canvasApp.urlPrefix + 'Images/' + exchange + '-logo-background.png' logoAA.src = window.canvasApp.urlPrefix + 'Images/sa-logo-background.png' - chartGrid = newChartGrid() - chartGrid.initialize() + // chartGrid = newChartGrid() + // chartGrid.initialize() breakpointsBar = newBreakpointsBar() breakpointsBar.initialize(thisObject.container, timeLineCoordinateSystem) @@ -251,7 +251,7 @@ let container - container = chartGrid.getContainer(point) + // container = chartGrid.getContainer(point) if (container !== undefined) { return container } @@ -321,7 +321,7 @@ if (thisObject.container.frame.isInViewPort()) { drawChartsBackground() - chartGrid.draw(thisObject.container, timeLineCoordinateSystem) + // chartGrid.draw(thisObject.container, timeLineCoordinateSystem) plotterManager.draw()