Right Scale Connected

This commit is contained in:
Luis Fernando Molina committed 2019-04-11 10:47:45 +02:00
1 parent 594e4851d8
commit 41d2d8db74
3 files changed
+28 -14

No files matched your search

+15 -9
View File
@@ -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. */
+8
View File
@@ -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) {
+5 -5
View File
@@ -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()