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

Image doesn't rescale when you change orientation #117

Closed
narodejesus opened this issue Oct 5, 2017 · 2 comments
Closed

Image doesn't rescale when you change orientation #117

narodejesus opened this issue Oct 5, 2017 · 2 comments

Comments

@narodejesus
Copy link

The image doesn't rescale if you change the orientation in IOS
in android works perfectly

here is the screenshot
screen shot 2017-10-05 at 3 52 22 pm
screen shot 2017-10-05 at 3 52 28 pm

@computerjazz
Copy link

The PhotoVIew doesn't seem to respect new width and height on orientation change. My workaround is to set a key on the PhotoView to force a rerender on orientation change:

            <PhotoView
                  key={`PhotoView-landscape-${isLandscape}`}
                    source={{uri: image}}
                    minimumZoomScale={1}
                    maximumZoomScale={10}
                    androidScaleType="fitCenter"
                    onLoad={() => console.log("Image loaded!")}
                    style={{ width: isLandscape ? deviceHeight : deviceWidth }}
                  />

@narodejesus
Copy link
Author

thanks @computerjazz .. it works though it result some minor flickers

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

2 participants