Refactoring RateScale

This commit is contained in:
Luis Fernando Molina committed 2019-04-21 10:19:15 +02:00
1 parent 67d7e99e30
commit de2a8f8034
3 files changed
+4 -5

No files matched your search

+2 -2
View File
@@ -510,10 +510,10 @@
/* Now we put the scale on the right side of the chart */
drawRigthScale()
drawRateScale()
drawLeftScale()
function drawRigthScale () {
function drawRateScale () {
/* And now the scale. */
let fontSize = 10
+1 -2
View File
@@ -1,4 +1,4 @@
function newRigthScale () {
function newRateScale () {
const MODULE_NAME = 'Right Scale'
const INFO_LOG = false
const INTENSIVE_LOG = false
@@ -214,4 +214,3 @@ to be visible at the top of the viewPort. */
browserCanvasContext.stroke()
}
}
+1 -1
View File
@@ -114,7 +114,7 @@ function newTimeMachine () {
timeScale.initialize(timeLineCoordinateSystem)
rigthScale = newRigthScale()
rigthScale = newRateScale()
rigthScale.container.connectToParent(thisObject.container, false, false)
rigthScale.container.eventHandler.listenToEvent('Height Percentage Changed', function (event) {
thisObject.container.frame.height = TIME_MACHINE_HEIGHT * event.heightPercentage / 100