changes in ratescale working

This commit is contained in:
Luis Fernando Molina committed 2020-01-30 23:28:40 +01:00
1 parent 4b5613db1f
commit 1e4238ea3c
4 files changed
+40 -90

No files matched your search

+10 -4
View File
@@ -194,7 +194,7 @@ function newTimeMachine () {
thisObject.container.frame.width = TIME_MACHINE_WIDTH + TIME_MACHINE_WIDTH * event.scale
recalculateCoordinateSystem()
if (event.isUserAction === true) {
moveToUserPosition(thisObject.container, timeMachineCoordinateSystem, false, true, event.mousePosition, true)
// moveToUserPosition(thisObject.container, previousCoordinateSystem, timeMachineCoordinateSystem, false, true, event.mousePosition, true)
}
thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event)
}
@@ -213,10 +213,16 @@ function newTimeMachine () {
thisObject.rateScale.initialize(timeMachineCoordinateSystem, thisObject.container, thisObject.container)
function rateScaleValueChanged (event) {
thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * event.scale
recalculateCoordinateSystem()
if (event.isUserAction === true) {
moveToUserPosition(thisObject.container, timeMachineCoordinateSystem, true, false, event.mousePosition, true)
let currentDate = getDateFromPoint(event.mousePosition, thisObject.container, timeMachineCoordinateSystem)
let currentRate = getRateFromPoint(event.mousePosition, thisObject.container, timeMachineCoordinateSystem)
thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * event.scale
recalculateCoordinateSystem()
moveToUserPosition(thisObject.container, currentDate, currentRate, timeMachineCoordinateSystem, true, false, event.mousePosition, true)
} else {
thisObject.container.frame.height = TIME_MACHINE_HEIGHT + TIME_MACHINE_HEIGHT * event.scale
recalculateCoordinateSystem()
}
thisObject.container.eventHandler.raiseEvent('Dimmensions Changed', event)
thisObject.container.eventHandler.raiseEvent('Upstream Rate Scale Value Changed', event)