-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(Group): patch #7916 #8000
fix(Group): patch #7916 #8000
Conversation
Code Coverage Summary
|
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.
Ready
Code Coverage Summary
|
Code Coverage Summary
|
dereference canvas before firing `removed` event
Code Coverage Summary
|
Code Coverage Summary
|
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.
updated from master
READY TO MERGE!
Code Coverage Summary
|
this.fire('object:removed', { target: obj }); | ||
obj.fire('removed', { target: this }); | ||
obj._set('canvas', undefined); |
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.
is there any bug with removing the canvas before or after?
We could pass a reference to the canvas in the event itself as oldCanvas?
In general what are the reason for this line swap?
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.
In terms of design and naming it's removed
so I think canvas should not be referenced anymore once the event triggers (this is how group behaves) so it is consistent across fabric
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.
And it is passed as the target
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.
oh right this is the canvas not the object. i didn't think of it.
Hopefully this is all we missed out in #7916 .
Resolves #7916 (review)