Aaron Pham
2025-03-06 5a39719898fe486994750ec24fa430f332fa67eb
fix(graph): set container as renderGroup to avoid redrawing multiple times (#1736)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
1 files modified
6 ■■■■ changed files
quartz/components/scripts/graph.inline.ts 6 ●●●● patch | view | raw | blame | history
quartz/components/scripts/graph.inline.ts
@@ -370,9 +370,9 @@
  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) {