Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

added centerOn, changed maxZoom method #15

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

Conversation

theJenix
Copy link

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

Changed the maxZoom method to better support rectangular images

@theJenix
Copy link
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.

@SalmanTKhan
Copy link

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
Copy link

weakapp commented Jan 30, 2013

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants