-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
onCropComplete is firing on window resize #309
Comments
Having this callback fired is mandatory as the crop data is dependent on the window size. However, you have a good point regarding deboucing. We should add a debounce here. Would you like to do a PR? |
Sure I can do that. Do you mind if I use the debounce package? |
No it's fine as it's small enough 🙂 |
Great will find some time in the next day or so and comment the PR here. |
Looks like window resize uses the computeSizes method
If i debounce the resize I will have to pass the same debounced function into Would it be safe or okay to debounce the
or wrap it just for the resize
|
Indeed, it's better to only do the debounce for the |
Describe the bug
If you resize the window, onCropComplete fires.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not expecting onCropComplete to fire on window resize.. i understand why this might be in place for responsive reasons. But if it is a required feature I would expect the window resize to be debounced.
The text was updated successfully, but these errors were encountered: