mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Fix zoom out when wheel event.deltaY is zero
Don't apply zoom in or zoom out when deltaY is zero on wheel events. Should fix https://github.com/openseadragon/openseadragon/issues/947 and not make OpenSeadragon zoom out when scrolling horizontally on a touchpad
This commit is contained in:
parent
640526b444
commit
810987210c
@ -2070,7 +2070,7 @@
|
||||
// y-index scrolling.
|
||||
// event.deltaMode: 0=pixel, 1=line, 2=page
|
||||
// TODO: Deltas in pixel mode should be accumulated then a scroll value computed after $.DEFAULT_SETTINGS.pixelsPerWheelLine threshold reached
|
||||
nDelta = event.deltaY < 0 ? 1 : -1;
|
||||
nDelta = event.deltaY ? (event.deltaY < 0 ? 1 : -1) : 0;
|
||||
|
||||
eventInfo = {
|
||||
originalEvent: event,
|
||||
|
Loading…
Reference in New Issue
Block a user