Replies: 2 comments 6 replies
-
Good point! |
Beta Was this translation helpful? Give feedback.
1 reply
-
I don't think the case of object:added is a dangerous one. How often does it happen? Which are the cases in which this happen often? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
fabric.js/src/LayoutManager/LayoutManager.ts
Lines 291 to 329 in 9ec5a3d
As we can see,
layout:after
is fired andparent.layoutManager.performLayout
is called even iflayoutResult
is undefined. Notably, because of bubbling the ActiveSelection is uselessly recalculating the layout of a selection if any layout event (e.g.added
) happened in the selected tree, even though it resulted in no layout change.I wonder if fabric should be noop if there is no
layoutResult
or this can be left to be decided by the app by extendingLayoutManager
if not desired.Beta Was this translation helpful? Give feedback.
All reactions