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) { function onMousewheel(e) {
var $target = $(e.target), var $target = $(e.target),
factor = e.deltaY < 0 ? 2 : 0.5; factor = e.deltaY > 0 ? 2 : 0.5;
if (e.deltaX == 0 && Math.abs(e.deltaY) > 10 && !self.mousewheelTimeout) { if (e.deltaX == 0 && Math.abs(e.deltaY) && !self.mousewheelTimeout) {
if ($target.is('.OxImage') || $target.is('.OxImageOverlayArea')) { if ($target.is('.OxImage') || $target.is('.OxImageOverlayArea')) {
self.options.center = getZoomCenter(e, factor); self.options.center = getZoomCenter(e, factor);
self.options.zoom = self.zoom * factor; self.options.zoom = self.zoom * factor;