-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fixes StaticCanvas.onBeforeScaleRotate not triggering when canvas is zoomed #4748
Conversation
Cool! try with
and then commit/push again |
Would be nice to add a small test |
If there are no test examples with event generation i ll help, but i think there is something around. |
Took me an hour to figure out where, how and what to test. Let me know if there are any changes. Will do it tomorrow. First time took me a lot of time. Shouldn't take long next time. |
I have another doubt: shouldn't onBeforeScaleRotate be member of Canvas instead of StaticCanvas? |
definetely. but do not worry to change it now, is a potentially dangerous change for which may be test missing. |
|
||
canvas.zoomToPoint({ x: 0, y: 0 }, 1); | ||
canvas.onBeforeScaleRotate = _onBeforeScaleRotate; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect test.
Is good, thanks for the test, is extensive and well written. |
…zoomed (fabricjs#4748) * Fixed StaticCanvas.onBeforeScaleRotate not getting triggered when canvas is zoomed. * Added test for Canvas._beforeTransform.
Fixes #4746