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) {
|
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;
|
||||||
|
|
Loading…
Reference in a new issue