mac bug fixed
This commit is contained in:
1 parent
f70ace1feb
commit
df2abdb644
2 files changed
+9
-2
No files matched your search
@@ -200,7 +200,12 @@ function newViewport () {
|
||||
if (thisObject.visible === false) { return }
|
||||
if ((event.ctrlKey === true || event.metaKey === true)) { return }
|
||||
let morePower = 1
|
||||
let amount = event.delta * MAC_AMOUNT_FACTOR
|
||||
let amount = event.delta
|
||||
|
||||
if (IS_MAC) {
|
||||
event.delta = event.delta * MAC_AMOUNT_FACTOR
|
||||
}
|
||||
|
||||
if (event.buttons === 4) { morePower = 2 } // Mouse wheel pressed.
|
||||
/* We adjust the sensitivity for Mac Users */
|
||||
|
||||
@@ -220,7 +225,7 @@ function newViewport () {
|
||||
if (thisObject.zoomTargetLevel + amount * morePower < MIN_ZOOM_LEVEL) {
|
||||
return false
|
||||
}
|
||||
thisObject.zoomTargetLevel = Math.round(Math.round((thisObject.zoomTargetLevel + amount * morePower) * MAC_AMOUNT_FACTOR) / MAC_AMOUNT_FACTOR)
|
||||
thisObject.zoomTargetLevel = Math.round(thisObject.zoomTargetLevel + amount * morePower)
|
||||
|
||||
ANIMATION_INCREMENT = Math.round(Math.abs(thisObject.zoomTargetLevel - thisObject.zoomLevel) / ANIMATION_STEPS * 100) / 100
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ function newSystemEventHandler () {
|
||||
|
||||
if (WEB_SOCKETS_CONNECTION.readyState === 1) { // 1 means connected and ready.
|
||||
WEB_SOCKETS_CONNECTION.send(JSON.stringify(command))
|
||||
} else {
|
||||
console.log('WebSocket message could not be sent because the connection was not ready. Message = ' + JSON.stringify(command))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user