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

Allow programmatic rotate when PhotoView enableRotation is disabled #259

Closed
wants to merge 0 commits into from

Conversation

scopendo
Copy link
Contributor

@scopendo scopendo commented Feb 25, 2020

Allows the photo view to be rotated by setting the PhotoViewController.rotation property even when the photo view's enableRotation property is not enabled.

Relates to issue #257.

@scopendo
Copy link
Contributor Author

Pull request updated with an example. This PR now allows programmatic rotation of the photo view when gesture-based rotation is disabled, meaning that enableRotation is false.

The PR also includes a follow-on fix for preventing rotation value being updated in the output stream by manual rotation gestures, when enableRotation is false.

@scopendo
Copy link
Contributor Author

Updated to fix an issue whereby scaling after programmatic rotation reverted the (custom) child back to the original rotation. In so doing the fix is much simpler, avoiding sub-classing PhotoViewControllerValue.

In essence, the fix is to allows apply the rotation to the transform, ensuring however that manual rotation gestures do not update the internal rotation state.

@renancaraujo
Copy link
Member

Gonna hold this merge since it is a breaking change, sorry for that.

@120011676
Copy link

It feels like sometimes you need to disable gestures and allow programming

@renancaraujo
Copy link
Member

renancaraujo commented Aug 13, 2020

Tried to rebase by myself and messed up your branch pretty hard.
Opening a new PR and adding you as co-author.

Sorry for that.

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.

3 participants