zoomOverlay is removed from the DOM

WebViewer Version: 8.6.1

I have enabled enableDesktopOnlyMode, but when the viewer width is decreased under a certain threshold, zoomOverlay (.ToggleZoomOverlay) is removed from the DOM.

If it were hidden with CSS, instead of javascript, then devs could easily modify the behavior. Is there any solution for keeping this component visible without hacking the source code?

Thanks!

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hello Tovi,

We are using media queries to render the zoom overlay if the width is large enough, heres the permalink to our public UI: webviewer-ui/ToggleZoomOverlay.js at 596ec9d312b0e5f935559703479012b0fffdbfe1 · PDFTron/webviewer-ui · GitHub

To change this it would require forking our UI and making the changes manually.

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron

Thanks for the answer Tyler.

I would like to cast my vote for giving more ui responsibility to the webviewer constructor and/or css (so it can be easily overridden).

Forking the code makes updates/debugging much more time consuming.

Hello Tovi,

I will add a task in our backlog to add more UI customization in these types of situations.
Thank you for your feedback!

Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron

1 Like