Open AresEkb opened 3 hours ago
Here is the fix https://github.com/eclipse-sirius/sirius-web/pull/4207
The problem is that <DiagramPanel>
calls useArrangeAll()
that calls useViewport()
. When you drag a diagram, a viewport is changed, so useViewport()
hook is updated, so useArrangeAll()
is updated and so <DiagramPanel>
is re-rendered. It can be re-rendered hundreds times during drag
I added a new hook useViewportZoom()
that updated when zoom is changed. It's not updated on diagram drag
Screenshots
No
Steps to reproduce
Drag any diagram to change its viewport. You can try to do it fast, in different directions.
Expected behavior
The diagram viewport is changed without any lags.
Actual behavior
Diagram drag is very laggy.