diff --git a/CanvasApp/FloatingSpace/FloatingObject.js b/CanvasApp/FloatingSpace/FloatingObject.js index 68ff5f01a..f68de09a6 100644 --- a/CanvasApp/FloatingSpace/FloatingObject.js +++ b/CanvasApp/FloatingSpace/FloatingObject.js @@ -492,7 +492,7 @@ function newFloatingObject () { } function initializeFontSize (suggestedValue) { - var size = suggestedValue + let size = suggestedValue if (size < 3) { size = 3 } @@ -502,6 +502,17 @@ function newFloatingObject () { thisObject.currentFontSize = size / 3 } + function initializeHierarchyRing (suggestedValue) { + let radius = suggestedValue + if (radius < 3) { + radius = 3 + } + + thisObject.rawHierarchyRing = radius + thisObject.targetHierarchyRing = radius + thisObject.currentHierarchyRing = radius / 3 + } + function initializeCurrentPosition (arroundPoint) { let position = {} diff --git a/CanvasApp/Scales/TimeFrameScale.js b/CanvasApp/Scales/TimeFrameScale.js index ab67a0bb9..c41907ee9 100644 --- a/CanvasApp/Scales/TimeFrameScale.js +++ b/CanvasApp/Scales/TimeFrameScale.js @@ -253,10 +253,8 @@ function newTimeFrameScale () { } function onMouseWheel (event) { - delta = event.wheelDelta - if (IS_MAC) { - if (delta < 0) { + if (event.wheelDelta < 0) { if (wheelDeltaDirection === -1) { wheelDeltaCounter++ if (wheelDeltaCounter < 5) { diff --git a/CanvasApp/Scales/TimeScale.js b/CanvasApp/Scales/TimeScale.js index 62a1220b3..fdf3a3a7b 100644 --- a/CanvasApp/Scales/TimeScale.js +++ b/CanvasApp/Scales/TimeScale.js @@ -116,6 +116,36 @@ function newTimeScale () { } function onMouseWheel (event) { + if (IS_MAC) { + if (event.wheelDelta < 0) { + if (wheelDeltaDirection === -1) { + wheelDeltaCounter++ + if (wheelDeltaCounter < 5) { + return + } else { + wheelDeltaCounter = 0 + } + } else { + wheelDeltaCounter = 0 + wheelDeltaDirection = -1 + return + } + } else { + if (wheelDeltaDirection === 1) { + wheelDeltaCounter++ + if (wheelDeltaCounter < 5) { + return + } else { + wheelDeltaCounter = 0 + } + } else { + wheelDeltaCounter = 0 + wheelDeltaDirection = 1 + return + } + } + } + if (event.shiftKey === true) { autoScaleButton.container.eventHandler.raiseEvent('onMouseWheel', event) return