Open peilingjiang opened 2 weeks ago
We no longer unmount shapes, we just use display: none
for the ones outside of the viewport. This helps with performance, but should avoid issues with remounting. Are you having any problems due to this?
Thanks for the reply. I had some performance issues zooming in and out when there were a lot of components. Seems I need to look out for other approaches to optimize it.
Meanwhile, there is another problem. I sometimes render hanging widgets on the side of the shapes, as a child in the shape component, outside of the indicator area of the shape. While there are other ways to render them---like through components floating on top of the canvas, it's easier to manage them for each shape this way. However, as they are not part of the indicator, they will suddenly disappear as long as the shape is off-screen. I wonder if it's possible to disable the display: none
behavior in this case? Thanks.
What's the feature?
ShapeUtil
used to accept acanUnmount
override, which is very helpful to avoid remounting costly components (including those that may make internet requests). Was it moved to some other places? Can we enable a way to avoid a shape being unmounted?Where would you like this feature?
The developer package
Contact Details
No response
Code of Conduct