-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Feature/disable zoom #31
Conversation
added setZoomEnabled() method to ZoomApi added implementations for ZoomLayout and ZoomImageView
added api methods for "setXxxPanEnabled" methods added implementation for "setXxxPanEnabled" in ZoomEngine
…ing touch input added xml examples to README
Well there's a nother travis issue in this one... hope you can fix it easily. |
Thanks for this one as well 👍 About the from the user part, is this by choice? Do you think it's more useful than disabling it for all uses? I'm just asking, I have not thought about this. |
I have taken a look at the source now. Yeah, let's not block the API usage. But about implementation in this PR, could you use |
As for the "from the user" part, yes this is intentionally. A more sophisticated implementation could allow disabling things for the user and the programmer separately, but I don't think this really is a necessity. I think I could use the |
Just to add to the last section: Imho changing the behaviour partly via state and partly using 0 values that should come from the same "preference" (the enabled flag) would complicate things unnecessarily. But of course you are welcome to disagree with me on this. |
No, I agree, I didn't think about the vertical / horizontal issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* added zoomEnabled attribute added setZoomEnabled() method to ZoomApi added implementations for ZoomLayout and ZoomImageView * added xml attributes "verticalPanEnabled" and "horizontalPanEnabled" added api methods for "setXxxPanEnabled" methods added implementation for "setXxxPanEnabled" in ZoomEngine * changed documentation to include info about the attribute only affecting touch input added xml examples to README * added description about new api methods to README * moved zoom api description to appropriate section
Note that this code only controls zoom and pan input from the user. Methods like
zoomIn()
orpanBy()
will still work even if any of the above mentioned attributes are set tofalse
.This is a PR for Issue #16 and #15