fix mouse zoom in imageview on linux
This commit is contained in:
parent
ea918ff6da
commit
fc4dc70545
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue