fix(graph): set container as renderGroup to avoid redrawing multiple times (#1736)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2025-03-05 20:33:16 -05:00 committed by GitHub
parent 3c8ccde624
commit 5a39719898
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -370,9 +370,9 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
const stage = app.stage
stage.interactive = false
const labelsContainer = new Container<Text>({ zIndex: 3 })
const nodesContainer = new Container<Graphics>({ zIndex: 2 })
const linkContainer = new Container<Graphics>({ zIndex: 1 })
const labelsContainer = new Container<Text>({ zIndex: 3, isRenderGroup: true })
const nodesContainer = new Container<Graphics>({ zIndex: 2, isRenderGroup: true })
const linkContainer = new Container<Graphics>({ zIndex: 1, isRenderGroup: true })
stage.addChild(nodesContainer, labelsContainer, linkContainer)
for (const n of graphData.nodes) {