question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable spring for zooming with touch gesture

See original GitHub issue

Is 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:open
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
iangilmancommented, Sep 28, 2017

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 honor constrainDuringPan. Maybe what we need is a new constrainDuringZoom to help with this situation?

0reactions
iangilmancommented, Oct 26, 2017

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found