Enable spring for zooming with touch gesture
See original GitHub issueIs there any way to enable spring when zooming by pinching (touch gesture)?
From what I have come across it seems to be a deliberate choice that spring is only enabled when dragging and not when zooming. I would like the zoom to be a bit smoother, as it is when scrolling with the mouse.
Furthermore I think this can alleviate issues I have with the image jumping when trying to zoom further in our out than the minZoomLevel
or maxZoomLevel
while having constrainDuringPan
enabled. This jumping only happens when zooming with the pinch gesture and not when scrolling, leading me to believe that enabling the spring will fix it.
Best regards
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Pan and Pinch to Zoom with React Use Gesture - YouTube
Hey all! Here's the code we wrote: https://github.com/samselikoff/2020-12-15-image-cropper/commit/0e26c1ba066b726e3d7662444c447eeaff121abd.
Read more >Spring Forward with Zoom Whiteboard, Gesture Recognition ...
Easily share how you're feeling with others and encourage seamless engagement with Gesture Recognition, which allows for visual gestures, such ...
Read more >Add touch gestures to legacy swing application - java
I have a legacy swing application that I need to add touch gestures to,specifically pinch to zoom and touch and drag.
Read more >react-spring-lightbox - Docs - Tim Ellenberger
☝️ Mousewheel , swipe or click+drag to page photos · ⌨️Keyboard controls ← → Esc · Ctrl + Mousewheel or Trackpad Pinch to...
Read more >Adding Pinch-to-Zoom Gestures with React Native - Crowdbotics
React Native's built-in touch Gesture Responder system has given us all some performance problems on both iOS and Android platforms.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It appears we don’t expose a flag for turning on animations for pinch. Here’s the code:
https://github.com/openseadragon/openseadragon/blob/master/src/viewer.js#L2956
That
true
at the end of the line means “immediately”, i.e. no animation.You might try changing it to false and building a fresh OSD to see if your hunch is correct.
There also doesn’t appear to be any zoom version of
constrainDuringPan
, and zoom doesn’t honorconstrainDuringPan
. Maybe what we need is a newconstrainDuringZoom
to help with this situation?@thatcher A good place to start is the various gestureSettings entries in http://openseadragon.github.io/docs/OpenSeadragon.html#.Options. We could definitely use some examples on the site though!