-
-
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
fix(): calcOCoords
#9547
fix(): calcOCoords
#9547
Conversation
Build Stats
|
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.
fixed
isn't it bad that no test failed? |
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.
not perfect but better I think
a145fd6
to
bd7b8d3
Compare
No because there was no bug, the case you mention under bug is actually a non supported vieportTransform, so it wasn't tested. |
return createRotationMatrix(degreesToRadians(angle), origin); | ||
} | ||
|
||
export function createRotationMatrix( |
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.
can we remove this double function? we talked about it in some meeting, to keep just the one with angle
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.
Do you mind if I change the signature to accept angle as it does or rotation for the rad value?
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.
I think we have the api in angle, so no api with radiants. calcRotateMatrix is good enough.
this.forEachControl((control, key) => { | ||
const position = control.positionHandler(dim, finalMatrix, this, control); |
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.
i can't grasp if finalMatrix and T are the same.
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.
They should be apart from the inverted vpt zoom that is applied at the correct order.
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.
so this would displace all controls, those needs to be the same for when the zoom is a standard one.
update CHANGELOG.md
dc84dc6
to
e97d0eb
Compare
Handled by redo coords, ported to ShaMan123#4 |
Motivation
Was experiencing severe performance hits caused by calcOCoords so I gave it a critical look
Description
You can see in the video how the fix looks like
Keep to the bbox and not to the fact that control logic is broken.
This bug was a wrong multilication order.
fabric.js/src/shapes/Object/InteractiveObject.ts
Lines 223 to 230 in e4ac8b5
One step towards #8767
Performance:
Reduce the amount of calculations by relaying on the calculated aCoords
Use a simpler transform builder
This also removes comlexity of logic/maintainance because it reuses aCoords instead of generating more code to do the same thing
In Action
BUG
FIX