Final BUGS on timeScale fixed
This commit is contained in:
1 parent
2618151135
commit
41e95ca1a8
2 files changed
+6
-3
No files matched your search
@@ -79,7 +79,6 @@ function newTimeMachine () {
|
||||
|
||||
thisObject.container.eventHandler.listenToEvent('Dimmensions Changed', function (event) {
|
||||
recalculateScale()
|
||||
moveToUserPosition(thisObject.container, timeLineCoordinateSystem, false, false, event.mousePosition)
|
||||
})
|
||||
|
||||
/* First, we initialize the market that we are going to show first on screen. Later all the other markets will be initialized on the background. */
|
||||
@@ -116,6 +115,7 @@ function newTimeMachine () {
|
||||
thisObject.timeScale.container.eventHandler.listenToEvent('Lenght Percentage Changed', function (event) {
|
||||
thisObject.container.frame.width = TIME_MACHINE_WIDTH * event.lenghtPercentage / 100
|
||||
thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event)
|
||||
moveToUserPosition(thisObject.container, timeLineCoordinateSystem, false, true, event.mousePosition)
|
||||
})
|
||||
|
||||
thisObject.timeScale.initialize()
|
||||
@@ -125,6 +125,7 @@ function newTimeMachine () {
|
||||
thisObject.rateScale.container.eventHandler.listenToEvent('Height Percentage Changed', function (event) {
|
||||
thisObject.container.frame.height = TIME_MACHINE_HEIGHT * event.heightPercentage / 100
|
||||
thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event)
|
||||
moveToUserPosition(thisObject.container, timeLineCoordinateSystem, true, false, event.mousePosition)
|
||||
})
|
||||
|
||||
thisObject.rateScale.initialize(timeLineCoordinateSystem)
|
||||
|
||||
+4
-2
@@ -102,10 +102,11 @@ function newTimeScale () {
|
||||
const WIDTH = 6
|
||||
const LINE_WIDTH = 3
|
||||
const OPACITY = 0.2
|
||||
const DISTANCE_BETWEEN_ARROWS = 10
|
||||
const MIN_DISTANCE_FROM_CENTER = 110
|
||||
const CURRENT_VALUE_DISTANCE = MIN_DISTANCE_FROM_CENTER + thisObject.lenghtPercentage
|
||||
const MAX_DISTANCE_FROM_CENTER = MIN_DISTANCE_FROM_CENTER + 100
|
||||
let DISTANCE_BETWEEN_ARROWS = 9
|
||||
const MAX_DISTANCE_FROM_CENTER = MIN_DISTANCE_FROM_CENTER + 100 + DISTANCE_BETWEEN_ARROWS
|
||||
|
||||
let ARROW_DIRECTION = 0
|
||||
|
||||
ARROW_DIRECTION = -1
|
||||
@@ -250,3 +251,4 @@ function newTimeScale () {
|
||||
browserCanvasContext.fillText(label2, labelPoint2.x, labelPoint2.y)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user