Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinch to zoom #5

Open
JonathanWi opened this issue Oct 17, 2015 · 52 comments
Open

Pinch to zoom #5

JonathanWi opened this issue Oct 17, 2015 · 52 comments

Comments

@JonathanWi
Copy link

Very nice update using the animated library! It really is smoother and lighter!

Do you think it would be possible - just like facebook lightbox - to enable a pinch to zoom?

Have a great day

@oblador
Copy link
Owner

oblador commented Oct 18, 2015

Hi, yeah it's on my todo. Thinking of maybe writing a carousel to go with it too. Just need some time to do it ;-)

@JonathanWi
Copy link
Author

Awesome news then! Could you ping me when it's up?

Cheers

@ashleydw
Copy link

ashleydw commented Nov 2, 2015

Would be great to have this too

@machard
Copy link

machard commented Nov 20, 2015

+1

4 similar comments
@btoueg
Copy link

btoueg commented Nov 20, 2015

👍

@dannytce
Copy link

+1

@iwater
Copy link

iwater commented Nov 24, 2015

+1

@NoBaR
Copy link

NoBaR commented Nov 25, 2015

+1

@oblador
Copy link
Owner

oblador commented Nov 29, 2015

I'm feeling the pressure haha. I've implemented this in the navigator-refactor branch.

See #8 (comment) for more info.

lightbox

@kwokster10
Copy link

Hi @oblador, I'm getting this to work fine on iOS but not on Android. When I click to zoom, it zooms in but doesn't pinch to zoom. It also scrolls but doesn't drag left to right to see details cut off from initial zoom. I'm using your navigator example and also cloned the navigator-refactor branch during npm install. Any help is appreciated. Thanks!

@oblador
Copy link
Owner

oblador commented Feb 1, 2016

@kwokster10: I'm aware of that issue, that's because ScrollView on android doesn't support zooming. I'm not sure if I should implement zooming for android completely custom or just wait for support to land in React Native core.

@kwokster10
Copy link

Oh, interesting. Is there a workaround for this? Would using ViewPagerAndroid make a difference? Thanks!

@oblador
Copy link
Owner

oblador commented Feb 2, 2016

@kwokster10: ViewPagerAndroid might help with paging the images but I don't think it'll help with zooming. Should be able to do zooming with scale transforms, but it wouldn't be as fluid as native zooming nor give you higher detail when zooming.

@apvlv
Copy link

apvlv commented May 5, 2016

Hello, i couldn't get to work the version from the navigator refactor branch.. I get the following error:

Element type is invalid: expected a string but got:object. Check the render method of image.ios.js

The main branch works without problems for me. I'm on react-native 0.25.1

@kobePer
Copy link

kobePer commented May 31, 2016

For those who can't get the navigator-refactor working for some reason but would like pinch-to-zoom,
Wrapping an image in a ScrollView and setting swipeToDismiss to false does the trick (assuming you prioritize zooming above swipeToDismiss)

<LightBox
        key={i}
        swipeToDismiss={false}
      >
        <ScrollView
          minimumZoomScale={1}
          maximumZoomScale={2}
          centerContent={true}
        >
          <Image
            style={styles.image}
            source={{'uri' : source}}
          >

          </Image>
        </ScrollView>
      </LightBox>

I realize this is not ideal, but it's a quick and easy fix for a small feature

@iit2008047
Copy link

+1 .. waiting eagerly :)

@HendrikZero72
Copy link

+1 mee too... On the navigator refactor branch I am getting the same error as @pvlvsk

@braco
Copy link

braco commented Jul 1, 2016

@oblador: just curious about timing, are you still working on this?

@oblador
Copy link
Owner

oblador commented Jul 3, 2016

@braco: Not actively currently but I will soon need this functionality for a project I'm working on, but with NavigationExperimental so consider the navigator branch dead. Hopefully I'll be able to release something more generic for NavigationExperimental but I can't promise it right nor do I have a timeplan.

@braco
Copy link

braco commented Jul 6, 2016

@oblador: thanks for the clarification. Sounds like there's a bunch of hungry puppies waiting for you here, myself included!

@alexgv14
Copy link

@oblador any update on this feature?

@waleedarshad-vf
Copy link

Thanks @oblador! Awesome Work :)

@toddmetheny
Copy link

toddmetheny commented Oct 26, 2016

Would someone using the pinch to zoom feature on the navigator-refactor branch be willing to help me with this? http://stackoverflow.com/questions/40264486/including-a-library-from-a-github-branch-in-react-native?noredirect=1#comment67789465_40264486

Not sure what I'm doing wrong. Thanks in advance.

update: @kobePer 's suggestion worked for me. gracias.

@Sam1301
Copy link

Sam1301 commented Jun 10, 2017

@oblador for zoom, consider looking at this library https://github.com/alwx/react-native-photo-view.

@jamesbaker1
Copy link

Is there a stable version of the pinch to zoom now?

@ptgamr
Copy link

ptgamr commented Oct 24, 2017

+1 ... really need / love to have this feature :)

@artsx
Copy link

artsx commented Nov 13, 2017

+1 !

@muaaz-vf
Copy link

+1

2 similar comments
@zhaonian
Copy link

+1

@SamiChab
Copy link

+1

@sandywk
Copy link

sandywk commented Jan 29, 2018

+1

5 similar comments
@marcoizzo
Copy link

+1

@ahmadw
Copy link

ahmadw commented Mar 6, 2018

+1

@davidjack7
Copy link

+1

@vcebotari
Copy link

+1

@drewdulz
Copy link

+1

@MaheshNandam
Copy link

@kobePer ,

Hey Kobeper, the above-mentioned code was working completely in ios but in android zooming is not working, can you suggest any update on top of it?

Thank you!.

@wassgha
Copy link

wassgha commented Mar 27, 2018

+1

2 similar comments
@ng-david
Copy link

+1

@mengpeilee
Copy link

+1

@MaheshNandam
Copy link

@kobePer,

the above-mentioned code is working fine on IOS devices but not on Android devices!

@anaibol
Copy link

anaibol commented Apr 20, 2018

+1

2 similar comments
@AnisDerbel
Copy link

+1

@somarjun
Copy link

+1

@eblaauw
Copy link

eblaauw commented Oct 11, 2018

+1, would be great to have this

@mo-hummus
Copy link

+1

@MR-Neto
Copy link

MR-Neto commented Jun 14, 2020

Any updates?

@waheedakhtar694
Copy link

@kobePer Your solution will only work for IOS any work around for android ?

@anaibol
Copy link

anaibol commented Aug 25, 2020

+1

@huyhai
Copy link

huyhai commented Nov 4, 2020

any update ?

@dondoko-susumu
Copy link

Any update ?

@aneeshcoddle
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests