diff --git a/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx b/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx index 37b414265608d519190b7b94e2432c22d9831a74..7cdf747c34b0c9b7cffda4ed4d30dc72e9911bf2 100644 --- a/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx +++ b/libs/shared/lib/vis/visualizations/nodelinkvis/components/NLPixi.tsx @@ -561,7 +561,7 @@ export const NLPixi = (props: Props) => { }; const updateLinkLabel = (link: LinkTypeD3) => { - if (graph.current.nodes.length > config.LABEL_MAX_NODES) return; + if (graph.current.nodes.length > config.LABEL_MAX_NODES || viewport.current!.transform.scale.x < 2) return; const text = linkLabelMap.current.get(link._id); if (!text) return; @@ -606,7 +606,7 @@ export const NLPixi = (props: Props) => { }; const updateNodeLabel = (node: NodeTypeD3) => { - if (graph.current.nodes.length > config.LABEL_MAX_NODES) return; + if (graph.current.nodes.length > config.LABEL_MAX_NODES || viewport.current!.transform.scale.x < 2) return; const text = nodeLabelMap.current.get(node._id) as Text | undefined; if (text == null) return;