fix mouse zoom in imageview on linux

This commit is contained in:
j 2015-10-22 11:33:37 +02:00
parent ea918ff6da
commit fc4dc70545

View file

@ -510,8 +510,8 @@ Ox.ImageViewer = function(options, self) {
function onMousewheel(e) {
var $target = $(e.target),
factor = e.deltaY < 0 ? 2 : 0.5;
if (e.deltaX == 0 && Math.abs(e.deltaY) > 10 && !self.mousewheelTimeout) {
factor = e.deltaY > 0 ? 2 : 0.5;
if (e.deltaX == 0 && Math.abs(e.deltaY) && !self.mousewheelTimeout) {
if ($target.is('.OxImage') || $target.is('.OxImageOverlayArea')) {
self.options.center = getZoomCenter(e, factor);
self.options.zoom = self.zoom * factor;
@ -640,4 +640,4 @@ Ox.ImageViewer = function(options, self) {
return that;
};
};