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.

[ScrollView] add defaultZoomScale

See original GitHub issue

Hi,

ScrollView is missing a defaultZoomScale that would allow to define the initial zoom scale.

The current zoomScale prop is controlled and flickers a lot. In my use-case, I just want to be able to define the initial zoom scale, not to control it.

I’ve also attempted to do this in componentDidMount:

this.refs.myScrollView.setNativeProps({
  zoomScale: 3
});

but this create inconsistency issue on the scrollview: I can basically zoom out of the bounds (it totally breaks the scrollview)

Thanks

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
emrekencicommented, May 21, 2016

I think being able to define the default zoom would be a much more elegant way of doing this. Calling scrollResponderZoomTo method requires measuring the component, actually calling the method somewhere like componentDidMount and calculating the width and height for the scale that you need. People will inevitably lean towards setting the zoomScale property to accomplish this.

0reactions
ahmetabdicommented, May 4, 2018

Any updates on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I reset after a UIScrollView zoom? - Stack Overflow
I was just looking to reset on load to default zoom scale, because when I ... When you create the scroll view, you...
Read more >
How to properly zoom into a picture using scroll view without ...
I figured it out, first bound the imageview in storyboard to the 4 edges of scrollview with 0 spacing, then add a constraint...
Read more >
Image crop view in iOS. A step by step tutorial to create an…
Here's how it will look like at the end : Then add a UIScrollView and a crop button to ... then finally zoom...
Read more >
How to support pinch to zoom in a UIScrollView
Making a scroll view zoom when you pinch is a multi-step approach, and you need to ... then add the viewForZooming(in:) method, like...
Read more >
PSPDFDocumentViewLayout Class | API Reference - PSPDFKit
A document view layout controls how a document is visualized on screen. It controls where a spread (a set of pages) is placed...
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