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

Added automaticInitialCoverScale #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

maraujop
Copy link

@maraujop maraujop commented Aug 31, 2016

In this case I needed my images to behave like if their resizeMode was set to cover and to be honest, if you agree, instead of adding a new prop like automaticInitialCoverScale I think it would be better to make resizeMode work, as that's the one people would expect to change in the original Image component and they already understand it.

When this prop is activated the image is rendered like if resizeMode was set to cover.

This PR also allows to use enableLimits from this other PR ldn0x7dc/react-native-view-transformer#5 and it also relies on initialScale prop from that PR to work. I could make them non dependent if you want me to.

Maybe it would be nice to pass <ViewTransformer {...this.props}> too, so that it would not be necessary to make PRs dependent.

Thanks, cheers
Miguel

maraujop added a commit to maraujop/react-native-view-transformer that referenced this pull request Aug 31, 2016
Sets the initial scale to be used, and allow cover mode to work in
react-native-transformable-image

ldn0x7dc/react-native-transformable-image#11
When this prop is activated the image is rendered like if `resizeMode` was
set to `cover`.

* It takes into account screen density
* Recalculate when source changes (this can happen when reusing a not yet
unmounted component).

Point to view-transformer branch with applyLimits feature
@maraujop maraujop force-pushed the feature-automaticInitialCoverScale branch from fcca330 to c9ba129 Compare September 8, 2016 15:04
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

Successfully merging this pull request may close these issues.

1 participant