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

Callback when max/min scale reached #34

Closed
sant11h opened this issue Mar 21, 2023 · 3 comments
Closed

Callback when max/min scale reached #34

sant11h opened this issue Mar 21, 2023 · 3 comments

Comments

@sant11h
Copy link

sant11h commented Mar 21, 2023

Hello! We appreciate your work for this lib.
I was wondering if you can add some sort of callback when the max or min scale is reached, for example:
onMaxScaleReached(() => // I want to do something here)

With this feature we give to the lib users the possibility of enabling or disabling the zoom in/out buttons when those events happen which is the use case that I need.
Thanks!

@worka
Copy link
Owner

worka commented Mar 26, 2023

Hello. You do not fit rescale() method for this?

rescale(instance) {
    // instance.content.minScale
    // instance.content.maxScale
    // instance.content.currentScale
}

@sant11h
Copy link
Author

sant11h commented Mar 30, 2023

Yes, that method did the trick.
Thanks for the support!

@sant11h sant11h closed this as completed Mar 30, 2023
@worka
Copy link
Owner

worka commented Mar 30, 2023

It would be awesome if you could add to here common variant of your private solution for descendants. I will paste link to this issue in RM.

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

No branches or pull requests

2 participants