You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This successfully locks the canvas within view when panning. However, when pinching and zooming so, it constrains panning in a jittery way, causing it to slightly go over the boundaries. This also happened when zooming in at the maximum level, but I managed to fix that with the following:
But this only slightly improves the glitch when zooming out. There is still a slight jitter. Any ideas how to fix this? Perhaps there is a need for constrainDuringPinch or ...Zoom?
The text was updated successfully, but these errors were encountered:
It's the panning part of the pinch that's jittering, right? I'd say that should be covered by constrainDuringPan, so we don't need a new flag for it. Sounds like it needs fixing though. Let me know if you'd like to pursue fixing it and I can help point you in the right direction.
iangilman
changed the title
Jittery canvas when zooming out on touchscreen
Jittery canvas when zooming out on touchscreen with constrainDuringPan
May 2, 2024
Yes, panning is constrained when only panning, but when pinching (zooming) AND panning, it pans in a jittery way. I'd be up for fixing it if you can help me. Thanks!
@samuset Wonderful! You'll need to get set up so you can build the code. Info on that is in https://github.com/openseadragon/openseadragon/blob/master/CONTRIBUTING.md. The I think you'll want to look at onCanvasPinch (and possibly onCanvasScroll) in viewer.js. They appear to already be calling applyConstraints, so I'm not sure what the issue is. At any rate, I think that's the place to start investigating.
I have these options that successfully constrain the canvas:
This successfully locks the canvas within view when panning. However, when pinching and zooming so, it constrains panning in a jittery way, causing it to slightly go over the boundaries. This also happened when zooming in at the maximum level, but I managed to fix that with the following:
But this only slightly improves the glitch when zooming out. There is still a slight jitter. Any ideas how to fix this? Perhaps there is a need for
constrainDuringPinch
or...Zoom
?The text was updated successfully, but these errors were encountered: