fix #554: zooming in/out breaks drawing area on Safari

This commit is contained in:
Julian Descottes 2016-10-10 18:14:06 +02:00
parent 4b378d48a2
commit 2b78456314

View File

@ -238,13 +238,15 @@
var evt = jQueryEvent.originalEvent; var evt = jQueryEvent.originalEvent;
// Ratio between wheelDeltaY (mousewheel event) and deltaY (wheel event) is -40 // Ratio between wheelDeltaY (mousewheel event) and deltaY (wheel event) is -40
var delta; var delta;
if (pskl.utils.UserAgent.isChrome) { if (pskl.utils.UserAgent.isIE11) {
delta = evt.wheelDeltaY;
} else if (pskl.utils.UserAgent.isIE11) {
delta = evt.wheelDelta; delta = evt.wheelDelta;
} else if (pskl.utils.UserAgent.isFirefox) { } else if (pskl.utils.UserAgent.isFirefox) {
delta = -40 * evt.deltaY; delta = -40 * evt.deltaY;
} else {
delta = evt.wheelDeltaY;
} }
delta = delta || 0;
var modifier = (delta / 120); var modifier = (delta / 120);
if (pskl.utils.UserAgent.isMac ? evt.metaKey : evt.ctrlKey) { if (pskl.utils.UserAgent.isMac ? evt.metaKey : evt.ctrlKey) {