fix(graph): set container as renderGroup to avoid redrawing multiple times (#1736)
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
| | |
| | | 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) { |