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

How to zoom to 1 but have it zoom to the center? #231

Open
waterdrake opened this issue Mar 14, 2023 · 3 comments
Open

How to zoom to 1 but have it zoom to the center? #231

waterdrake opened this issue Mar 14, 2023 · 3 comments

Comments

@waterdrake
Copy link

Currently, I use this to zoom out to full screen:

ZoomSurfaceView.zoomSurfaceView.zoomTo(1, true)

But it does not center the view when I do that, it just zooms out and if you were panning, it just zooms out to where the center point of your pan was.

Is there a way to zoom to 1 and also have it zoom to the center?

@markusressel
Copy link
Collaborator

I don't think there is an API for that atm. You would have to manually calculate the target position and use the moveTo() method.

@waterdrake
Copy link
Author

So use zoomImageView.moveTo(zoom, x, y, true);?

@markusressel
Copy link
Collaborator

markusressel commented Mar 16, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants