Closed rokotyan closed 3 months ago
@rokotyan do you know under what circumstance the flickering occurs? But regardless I think not re-render on each render is a good idea.
@lee00678 On any event that triggers graph rendering, e.g. a prop change in React (a pretty common scenario)
@lee00678 On any event that triggers graph rendering, e.g. a prop change in React (a pretty common scenario)
Gotcha. I see it happen now. Thanks for the info.
Currently SVG defs are re-appended on each render and it causes flickering. This PR fixes it.
Before (icons are flickering)
https://github.com/f5/unovis/assets/755708/e38b42c0-7b0d-40cc-9d7b-302a911d0ba2
After (no flickering)
https://github.com/f5/unovis/assets/755708/7b309156-9aee-444d-bf2f-c7660d5f00a2