Allow swiping while zoomed in to mobile viewer

46 views
Skip to first unread message

Matt Parizeau

unread,
Feb 26, 2015, 3:15:13 PM2/26/15
to pdfnet-w...@googlegroups.com
Q:

Is it possible to allow pages to be changed when the mobile viewer is zoomed in?

A:

You just need to make a small adjustment to MobileReaderControl.js. Find the onSwipe function and in the first if statement remove me.isZoomedIn() and me.recentlyZoomed. Once those are removed you'll be able to swipe even when the current page is zoomed in.

Donald Gordon

unread,
Oct 31, 2016, 1:17:44 PM10/31/16
to PDFTron WebViewer
Hi

This isn't working with current WebViewer.

Steps to reproduce:
  • download latest webviewer from PDFTron site and unzip
  • edit WebViewer/lib/html5/MobileReaderControl.js to remove me.isZoomedIn() and me.recentlyZoomed from the if statement on line 2248.
  • spin up your favourite webserver serving out of the WebViewer folder
  • Navigate to http://[ip]:[port]/doc/WebViewer_User_Guide.html in Safari on an iPad
  • Double tap to zoom in
  • Swipe left to switch to page 2
  • Notice that you're still on page 1
Could you provide a workaround or bugfix?

Regards

Donald

Matt Parizeau

unread,
Nov 1, 2016, 7:53:37 PM11/1/16
to PDFTron WebViewer
Hi Donald,

Thanks for the steps, we were able to reproduce the problem. To fix this you can make one small change to the bindEvents function in MobileReaderControl.js. Change me.$viewerPage.bind('swipeleft swiperight') to me.$wrapper.bind(...)
This change will be included in future WebViewer releases.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Donald Gordon

unread,
Nov 2, 2016, 12:35:03 PM11/2/16
to PDFTron WebViewer
Thanks Matt!
Reply all
Reply to author
Forward
0 new messages