Problem with scales not appearing fixed
This commit is contained in:
1 parent
3790c6e1bc
commit
16fb5edd0a
2 files changed
+47
-47
No files matched your search
+25
-25
@@ -58,8 +58,8 @@ function newChartSpace () {
|
||||
|
||||
/* We make the time machine a little bit smaller than the current space. */
|
||||
|
||||
timeMachine.container.frame.position.x = this.container.frame.width / 2 - timeMachine.container.frame.width / 2
|
||||
timeMachine.container.frame.position.y = this.container.frame.height / 2 - timeMachine.container.frame.height / 2
|
||||
timeMachine.container.frame.position.x = thisObject.container.frame.width / 2 - timeMachine.container.frame.width / 2
|
||||
timeMachine.container.frame.position.y = thisObject.container.frame.height / 2 - timeMachine.container.frame.height / 2
|
||||
|
||||
timeMachine.initialize(onTimeMachineInitialized)
|
||||
|
||||
@@ -83,6 +83,29 @@ function newChartSpace () {
|
||||
}
|
||||
}
|
||||
|
||||
function getContainer (point, purpose) {
|
||||
if (thisObject.visible !== true) { return }
|
||||
|
||||
let container
|
||||
|
||||
/* Now we see which is the inner most container that has it */
|
||||
|
||||
for (let i = 0; i < thisObject.timeMachines.length; i++) {
|
||||
container = thisObject.timeMachines[i].getContainer(point, purpose)
|
||||
if (container !== undefined) {
|
||||
if (container.isForThisPurpose(purpose)) {
|
||||
return container
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
return thisObject.container
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
function fitIntoVisibleArea (point) {
|
||||
/* Here we check the boundaries of the resulting points, so they dont go out of the visible area. */
|
||||
|
||||
@@ -162,28 +185,5 @@ function newChartSpace () {
|
||||
timeMachine.draw()
|
||||
}
|
||||
}
|
||||
|
||||
function getContainer (point, purpose) {
|
||||
if (thisObject.visible !== true) { return }
|
||||
|
||||
let container
|
||||
|
||||
/* Now we see which is the inner most container that has it */
|
||||
|
||||
for (let i = 0; i < this.timeMachines.length; i++) {
|
||||
container = this.timeMachines[i].getContainer(point, purpose)
|
||||
if (container !== undefined) {
|
||||
if (container.isForThisPurpose(purpose)) {
|
||||
return container
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
return thisObject.container
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
-22
@@ -186,27 +186,6 @@ function newTimeMachine () {
|
||||
}
|
||||
}
|
||||
|
||||
function drawBackground () {
|
||||
for (let i = 0; i < this.charts.length; i++) {
|
||||
let chart = this.charts[i]
|
||||
chart.drawBackground()
|
||||
}
|
||||
}
|
||||
|
||||
function draw () {
|
||||
if (thisObject.container.frame.isInViewPort()) {
|
||||
for (let i = 0; i < this.charts.length; i++) {
|
||||
let chart = this.charts[i]
|
||||
chart.draw()
|
||||
}
|
||||
|
||||
if (timeScale !== undefined) { timeScale.draw() }
|
||||
if (rigthScale !== undefined) { rigthScale.draw() }
|
||||
|
||||
// thisObject.container.frame.draw(false, true, false)
|
||||
}
|
||||
}
|
||||
|
||||
function getContainer (point, purpose) {
|
||||
let container
|
||||
|
||||
@@ -237,7 +216,7 @@ function newTimeMachine () {
|
||||
}
|
||||
}
|
||||
|
||||
if (thisObject.container.frame.isThisPointHere(point, true) === true) {
|
||||
if (thisObject.container.frame.isThisPointHere(point) === true) {
|
||||
return thisObject.container
|
||||
} else {
|
||||
if (purpose === GET_CONTAINER_PURPOSE.MOUSE_OVER) {
|
||||
@@ -247,6 +226,27 @@ function newTimeMachine () {
|
||||
}
|
||||
}
|
||||
|
||||
function drawBackground () {
|
||||
for (let i = 0; i < this.charts.length; i++) {
|
||||
let chart = this.charts[i]
|
||||
chart.drawBackground()
|
||||
}
|
||||
}
|
||||
|
||||
function draw () {
|
||||
if (thisObject.container.frame.isInViewPort()) {
|
||||
for (let i = 0; i < this.charts.length; i++) {
|
||||
let chart = this.charts[i]
|
||||
chart.draw()
|
||||
}
|
||||
|
||||
if (timeScale !== undefined) { timeScale.draw() }
|
||||
if (rigthScale !== undefined) { rigthScale.draw() }
|
||||
|
||||
// thisObject.container.frame.draw(false, true, false)
|
||||
}
|
||||
}
|
||||
|
||||
function recalculateScale () {
|
||||
if (INFO_LOG === true) { logger.write('[INFO] recalculateScale -> Entering function.') }
|
||||
|
||||
|
||||
Reference in new issue
Block a user