Skip to content

Commit 5a39719

Browse files
authored
fix(graph): set container as renderGroup to avoid redrawing multiple times (#1736)
Signed-off-by: Aaron Pham <[email protected]>
1 parent 3c8ccde commit 5a39719

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

quartz/components/scripts/graph.inline.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
370370
const stage = app.stage
371371
stage.interactive = false
372372

373-
const labelsContainer = new Container<Text>({ zIndex: 3 })
374-
const nodesContainer = new Container<Graphics>({ zIndex: 2 })
375-
const linkContainer = new Container<Graphics>({ zIndex: 1 })
373+
const labelsContainer = new Container<Text>({ zIndex: 3, isRenderGroup: true })
374+
const nodesContainer = new Container<Graphics>({ zIndex: 2, isRenderGroup: true })
375+
const linkContainer = new Container<Graphics>({ zIndex: 1, isRenderGroup: true })
376376
stage.addChild(nodesContainer, labelsContainer, linkContainer)
377377

378378
for (const n of graphData.nodes) {

0 commit comments

Comments
 (0)