From 3214494dc9f98e45f033692d485f0078cdb0e038 Mon Sep 17 00:00:00 2001 From: Grant Echols Date: Mon, 2 Nov 2015 16:03:27 -0700 Subject: [PATCH] Added code to swallow the canvas-scroll event if we are swallowing it because of time. --- src/viewer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/viewer.js b/src/viewer.js index aad68718..c539adaf 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -2783,11 +2783,13 @@ function onCanvasScroll( event ) { shift: event.shift, originalEvent: event.originalEvent }); + if (gestureSettings && gestureSettings.scrollToZoom) { + //cancels event + return false; + } } - - if (gestureSettings && gestureSettings.scrollToZoom) { - //cancels event - return false; + else { + return false; // We are swallowing this event } }