added centerOn, changed maxZoom method#15
Open
theJenix wants to merge 2 commits intosephiroth74:masterfrom
Open
added centerOn, changed maxZoom method#15theJenix wants to merge 2 commits intosephiroth74:masterfrom
theJenix wants to merge 2 commits intosephiroth74:masterfrom
Conversation
Author
|
Sorry this is in 2 commits...I had other ideas with the first commit and was under a deadline. The second commit reverts a lot of superfluous changes, and gets just the core functionality I want to push back into the main line. |
|
theJenix, very nice contribution, is there a way to keep the zoomed image rectangle bounds within image's bounds rather than the outside square, what I wanted to do was actually use this in conjunction with "option to force fill image to view" but it didn't work out so I tried zooming before and then using your center code. |
|
@SalmanTKhan : you can use scrollBy instead of using postTranslate, that way you may keep you image bounded. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a centerOn method, to programmatically center on a point in the image.
Changed the maxZoom method to better support rectangular images