You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ungroup them by removing the group object , interating through the objects and adding them again on canvas
After v6 groupping and ungroupping objects works fine using this code, but after ungroupping, if you create a active selection with the ungropped itens, they will be moved to the top of the Canvas, which i think is a behavior that the function object._restoreObjectsState() fixed before v6, but it seems this function was removed.
I tried to find examples of Ungroupping objects with the new version but didn't find any, also the older fabric docs only has examples when you have the actual group object after creating it, and none example when you get the object using getActiveObject()
Objects should remain at the same position after being ungroupped
Actual Behavior
Objects changes it's position to the top left of the canvas after creating an active selection with them
Group
Creating an active selection after ungroupping
Objects changed position after being selected by active selection
Error Message & Stack Trace
No response
The text was updated successfully, but these errors were encountered:
Hi, i tried using that and it's works for ungroupping but it's still happening the position issue. The issue happens if you create an active selection with both objects from the group created before, if you select only one of them it doesn't happen.
make a working fiddle if you want more specific help.
I did exactly what the description was saying.
I added 3 object on the canvas, i grouped them, i ungrouped them and it works with canvas.add(...group.removeAll())
CheckList
Version
6.0.1
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
20.11.0
Link To Reproduction
#7670
Steps To Reproduce
After v6 groupping and ungroupping objects works fine using this code, but after ungroupping, if you create a active selection with the ungropped itens, they will be moved to the top of the Canvas, which i think is a behavior that the function object._restoreObjectsState() fixed before v6, but it seems this function was removed.
I tried to find examples of Ungroupping objects with the new version but didn't find any, also the older fabric docs only has examples when you have the actual group object after creating it, and none example when you get the object using getActiveObject()
Expected Behavior
Objects should remain at the same position after being ungroupped
Actual Behavior
Objects changes it's position to the top left of the canvas after creating an active selection with them
Group
Creating an active selection after ungroupping
Objects changed position after being selected by active selection
Error Message & Stack Trace
No response
The text was updated successfully, but these errors were encountered: