mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-02-03 22:15:42 -06:00
fix: handle null positions correctly
This commit is contained in:
parent
25a6747d7d
commit
9d42b9fd94
@ -528,7 +528,7 @@ async function renderGraph(graph: HTMLElement, fullSlug: FullSlug) {
|
|||||||
if (stopAnimation) return
|
if (stopAnimation) return
|
||||||
for (const n of nodeRenderData) {
|
for (const n of nodeRenderData) {
|
||||||
const { x, y } = n.simulationData
|
const { x, y } = n.simulationData
|
||||||
if (!x || !y) continue
|
if (x == null || y == null) continue
|
||||||
n.gfx.position.set(x + width / 2, y + height / 2)
|
n.gfx.position.set(x + width / 2, y + height / 2)
|
||||||
if (n.label) {
|
if (n.label) {
|
||||||
n.label.position.set(x + width / 2, y + height / 2)
|
n.label.position.set(x + width / 2, y + height / 2)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user