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;
// Ratio between wheelDeltaY (mousewheel event) and deltaY (wheel event) is -40
var delta;
if (pskl.utils.UserAgent.isChrome) {
delta = evt.wheelDeltaY;
} else if (pskl.utils.UserAgent.isIE11) {
if (pskl.utils.UserAgent.isIE11) {
delta = evt.wheelDelta;
} else if (pskl.utils.UserAgent.isFirefox) {
delta = -40 * evt.deltaY;
} else {
delta = evt.wheelDeltaY;
}
delta = delta || 0;
var modifier = (delta / 120);
if (pskl.utils.UserAgent.isMac ? evt.metaKey : evt.ctrlKey) {