diff --git a/Scales/Commons.js b/Scales/Commons.js index db0bb567e..c935a38a2 100644 --- a/Scales/Commons.js +++ b/Scales/Commons.js @@ -5,7 +5,7 @@ function drawScaleDisplay (label1, label2, label3, xExtraOffSet1, xExtraOffSet2, let fontSize3 = 10 const RED_LINE_HIGHT = 4 - const OPACITY = 1 + const OPACITY = 0.75 let params = { cornerRadius: 15, diff --git a/Scales/RateScale.js b/Scales/RateScale.js index 08deeee63..8df57a2ed 100644 --- a/Scales/RateScale.js +++ b/Scales/RateScale.js @@ -93,6 +93,7 @@ function newRateScale () { visible = true } else { visible = false + turnOnCounter = 0 } } mouse = { @@ -132,7 +133,6 @@ function newRateScale () { } function getContainer (point) { - if (visible !== true) { return } if (thisObject.container.frame.isThisPointHere(point, true) === true) { return thisObject.container } @@ -230,12 +230,8 @@ function newRateScale () { let icon1 = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.payload.parentNode.type) let icon2 = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.type) - let backgroundColor - if (visible === true) { - backgroundColor = UI_COLOR.BLACK - } else { - backgroundColor = UI_COLOR.DARK - } + let backgroundColor = UI_COLOR.BLACK + drawScaleDisplay(label1, label2, label3, 0, 0, 0, icon1, icon2, thisObject.container, backgroundColor) } diff --git a/Scales/TimeFrameScale.js b/Scales/TimeFrameScale.js index 0fc5e9f93..7674b52a9 100644 --- a/Scales/TimeFrameScale.js +++ b/Scales/TimeFrameScale.js @@ -94,6 +94,7 @@ function newTimeFrameScale () { visible = true } else { visible = false + turnOnCounter = 0 } } mouse = { @@ -104,7 +105,7 @@ function newTimeFrameScale () { } } - function onMouseOver () { + function onMouseOver (event) { isMouseOver = true event.containerId = thisObject.container.id thisObject.container.eventHandler.raiseEvent('onMouseOverScale', event) @@ -222,7 +223,6 @@ function newTimeFrameScale () { } function getContainer (point) { - if (visible !== true) { return } if (thisObject.container.frame.isThisPointHere(point, true) === true) { return thisObject.container } @@ -278,12 +278,8 @@ function newTimeFrameScale () { let icon1 = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.payload.parentNode.type) let icon2 = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.type) - let backgroundColor - if (visible === true) { - backgroundColor = UI_COLOR.BLACK - } else { - backgroundColor = UI_COLOR.DARK - } + let backgroundColor = UI_COLOR.BLACK + drawScaleDisplay(label1, label2, label3, 0, 0, 0, icon1, icon2, thisObject.container, backgroundColor) } } diff --git a/Scales/TimeScale.js b/Scales/TimeScale.js index 55842cdc6..88260326e 100644 --- a/Scales/TimeScale.js +++ b/Scales/TimeScale.js @@ -92,6 +92,7 @@ function newTimeScale () { visible = true } else { visible = false + turnOnCounter = 0 } } mouse = { @@ -102,7 +103,7 @@ function newTimeScale () { } } - function onMouseOver () { + function onMouseOver (event) { isMouseOver = true event.containerId = thisObject.container.id thisObject.container.eventHandler.raiseEvent('onMouseOverScale', event) @@ -132,7 +133,6 @@ function newTimeScale () { } function getContainer (point) { - if (visible !== true) { return } if (thisObject.container.frame.isThisPointHere(point, true) === true) { return thisObject.container } @@ -212,12 +212,8 @@ function newTimeScale () { let icon1 = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.payload.parentNode.type) let icon2 = canvas.designerSpace.iconByUiObjectType.get(thisObject.payload.node.type) - let backgroundColor - if (visible === true) { - backgroundColor = UI_COLOR.BLACK - } else { - backgroundColor = UI_COLOR.DARK - } + let backgroundColor = UI_COLOR.BLACK + drawScaleDisplay(label1, label2, label3, 0, 0, 0, icon1, icon2, thisObject.container, backgroundColor) }