Fix zoom for mac users

This commit is contained in:
Luis Fernando Molina committed 2019-08-28 14:46:07 +02:00
1 parent ed0e0f0e07
commit 8c4fbe6609
2 files changed
+13

No files matched your search

+9
View File
@@ -79,7 +79,16 @@ function newAnimation () {
/* We request the next frame to be drawn, and stablishing a loop */
/* Use this code for full animation speed. */
animationLoopHandle = window.requestAnimationFrame(animationLoop)
/* Use this code for max 10 frames per second animation speed, if the app is consumming too much of your CPU. */
/*
setTimeout(nextLoop, 100)
function nextLoop () {
animationLoopHandle = window.requestAnimationFrame(animationLoop)
}
*/
} catch (err) {
if (ERROR_LOG === true) { logger.write('[ERROR] animationLoop -> err = ' + err.stack) }
}
+4
View File
@@ -204,6 +204,10 @@ function newViewPort () {
function applyZoom (amount) {
// console.log("applyZoom amount: " + amount);
/* We adjust the sensitivity for Mac Users */
let isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0
if (isMac) { amount = amount / 5 }
if (amount > 0) {
if (thisObject.zoomTargetLevel > -5) {
amount = amount * 2