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
I have searched and referenced existing issues and discussions
I am filing a BUG report.
I have managed to reproduce the bug after upgrading to the latest version
I have created an accurate and minimal reproduction
Version
6.0.2
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
None
Link To Reproduction
(2 links, see below)
Steps To Reproduce
Create a fabric.Rect instance (or other fabric.FabricObject)
Define an on('added', ()>{}) handler for it
Add it to a fabric.Group (and add the Group to the canvas and renderAll).
Expected Behavior
A defined on('added', ()>{}) handler will fire whether the FabricObject on which the handler is defined is added to a Group via .add or is added to the group when via the group's objects argument when the Group is constructed.
Actual Behavior
(following reproduction steps above)
If the Rect is added to the group via .add, the added event fires. (demo).
If the Rect is added to the group via the group's objects argument when the Group is constructed, the added event does not fire (demo).
Error Message & Stack Trace
No response
The text was updated successfully, but these errors were encountered:
I do think the added event is pointless in general in fabricJS and i m not sure it should fire at all in general, i tried to explain it in that doc between normal documentation.
What was your case for this event? can you point it out?
CheckList
Version
6.0.2
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
None
Link To Reproduction
(2 links, see below)
Steps To Reproduce
on('added', ()>{})
handler for itrenderAll
).Expected Behavior
A defined
on('added', ()>{})
handler will fire whether the FabricObject on which the handler is defined is added to a Group via.add
or is added to the group when via the group'sobjects
argument when the Group is constructed.Actual Behavior
(following reproduction steps above)
If the Rect is added to the group via
.add
, theadded
event fires. (demo).If the Rect is added to the group via the group's
objects
argument when the Group is constructed, theadded
event does not fire (demo).Error Message & Stack Trace
No response
The text was updated successfully, but these errors were encountered: