Calculating offsets with zoomToMouse

Hello @spamfilter ,

Thank you for the info.

Based on the information provided, does this issue with the offset only occur when you are zoomed out (i.e. both horizontal edges of the page are visible in the viewer)?

For context, under the hood, WebViewer does not allow you to pan the page horizontally if zoomed out enough. You can test this by switching to the pan tool when zoomed out (~50%) and attempting to drag the viewer horizontally. Based on the demo video provided, the last two instances where this “jump” behavior occurs seems to happen when zoomed out as described.

If this issue does only occur at lower zoom levels, other users have set up a custom display mode to prevent the horizontal position lock from occuring. We recommend implementing your zoomToMouse behavior with a custom DisplayMode to see if this gets around the jumping behavior. You can find the forum post with some of their findings here: https://community.apryse.com/t/simplest-way-to-set-the-exact-position-offset-of-a-page-within-the-scroll-view/11932

And an older one here: https://community.apryse.com/t/horizontal-display-mode/3614/4

Let us know if you need further clarification!

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.