-
-
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
[Bug]: rc2 break ActiveSelection if through group select #9938
Comments
hi @ritali4912 can you check the latest master? it seems ok to me. I think we also have a test case for this interaction (i'll verify ) |
i updated rc3, let me know if it changes anything, otherwise i ll mark as a bug and fix |
ok i see the point, i have to uncomment the originX to actually make the issue happen with latest master. actual reproduction case export async function testCase(canvas: fabric.Canvas) {
const utahCommonDefaults = {
originX: 'center' as const,
originY: 'center' as const,
};
fabric.ActiveSelection.ownDefaults = {
...fabric.ActiveSelection.ownDefaults,
...utahCommonDefaults,
};
fabric.Rect.ownDefaults = {
...fabric.Rect.ownDefaults,
...utahCommonDefaults,
};
const rect = new fabric.Rect({ width: 500, height: 500, fill: 'blue' });
const rect2 = new fabric.Rect({ width: 500, height: 500, fill: 'blue' });
canvas.add(rect, rect2);
} |
@asturur As my above picture. But then the follow code with set the bound to all 0. |
@asturur But from the logic, I think it is no matter what value of originX, originX. |
@ritali4912 check the fix here: #9940 and please have a look that the added e2e test represent your use case |
CheckList
Version
6.0.0-rc2
In What environments are you experiencing the problem?
Microsoft Edge
Node Version (if applicable)
None
Link To Reproduction
https://jsfiddle.net/ritali4912/deartfzo/30/
Steps To Reproduce
Expected Behavior
In beta 20, it is correct.
Actual Behavior
In rc2, the bounds of the ActiveSelection change to {left: 0, top: 0, width: 0, height: 0}
I check the code, and found it caused by the improper set properties timing. Especially If the user change the originX, originY which will impact on the layout result.
And with bellow change, I can get correct result.
Please evaluate and help to fix it in next release.
Error Message & Stack Trace
No response
The text was updated successfully, but these errors were encountered: