all scales
This commit is contained in:
1 parent
ed09b60555
commit
8d2ea28001
2 files changed
+37
No files matched your search
@@ -134,6 +134,42 @@ function newRateScale () {
|
||||
}
|
||||
|
||||
function onMouseWheel (event) {
|
||||
if (IS_MAC) {
|
||||
let sensitivity
|
||||
if (event.wheelDelta < 0) {
|
||||
if (event.shiftKey === true) {
|
||||
sensitivity = 20
|
||||
} else {
|
||||
sensitivity = 5
|
||||
}
|
||||
if (wheelDeltaDirection === -1) {
|
||||
wheelDeltaCounter++
|
||||
if (wheelDeltaCounter < sensitivity) {
|
||||
return
|
||||
} else {
|
||||
wheelDeltaCounter = 0
|
||||
}
|
||||
} else {
|
||||
wheelDeltaCounter = 0
|
||||
wheelDeltaDirection = -1
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if (wheelDeltaDirection === 1) {
|
||||
wheelDeltaCounter++
|
||||
if (wheelDeltaCounter < sensitivity) {
|
||||
return
|
||||
} else {
|
||||
wheelDeltaCounter = 0
|
||||
}
|
||||
} else {
|
||||
wheelDeltaCounter = 0
|
||||
wheelDeltaDirection = 1
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event.shiftKey === true) {
|
||||
autoScaleButton.container.eventHandler.raiseEvent('onMouseWheel', event)
|
||||
return
|
||||
|
||||
@@ -289,6 +289,7 @@ function newTimeFrameScale () {
|
||||
}
|
||||
}
|
||||
|
||||
let delta = event.wheelDelta
|
||||
if (delta < 0) {
|
||||
timeFrameIndex--
|
||||
if (timeFrameIndex < 0) {
|
||||
|
||||
Reference in new issue
Block a user