Skip to content

added centerOn, changed maxZoom method #15

wants to merge 2 commits into from

3 participants


Added a centerOn method, to programmatically center on a point in the image.

Changed the maxZoom method to better support rectangular images


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.

weakapp commented Jan 30, 2013

@SalmanTkhan : you can use scrollBy instead of using postTranslate, that way you may keep you image bounded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.