mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-05-18 22:44:14 +02:00
fix(graph): set container as renderGroup to avoid redrawing multiple times
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
parent
7e828252bb
commit
52e0312548
@ -363,9 +363,9 @@ async function renderGraph(container: string, fullSlug: FullSlug) {
|
|||||||
const stage = app.stage
|
const stage = app.stage
|
||||||
stage.interactive = false
|
stage.interactive = false
|
||||||
|
|
||||||
const labelsContainer = new Container<Text>({ zIndex: 3 })
|
const labelsContainer = new Container<Text>({ zIndex: 3, isRenderGroup: true })
|
||||||
const nodesContainer = new Container<Graphics>({ zIndex: 2 })
|
const nodesContainer = new Container<Graphics>({ zIndex: 2, isRenderGroup: true })
|
||||||
const linkContainer = new Container<Graphics>({ zIndex: 1 })
|
const linkContainer = new Container<Graphics>({ zIndex: 1, isRenderGroup: true })
|
||||||
stage.addChild(nodesContainer, labelsContainer, linkContainer)
|
stage.addChild(nodesContainer, labelsContainer, linkContainer)
|
||||||
|
|
||||||
for (const n of graphData.nodes) {
|
for (const n of graphData.nodes) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user