Actually run the label cull.
()
| 2102 | |
| 2103 | /** Actually run the label cull. */ |
| 2104 | private runLabelCull(): void { |
| 2105 | this.lastLabelCull = performance.now(); |
| 2106 | if (!this.showAllLabels) return; |
| 2107 | const invScale = this.labelInvScale(); |
| 2108 | const wantLabel: PixiNode[] = []; |
| 2109 | for (const node of this.nodes.values()) { |
| 2110 | if (!node.visible) continue; |
| 2111 | if (this.hasHighlight) { |
| 2112 | if (this.highlightNodes.has(node.id)) { |
| 2113 | wantLabel.push(node); |
| 2114 | } else if (node.label) { |
| 2115 | node.label.visible = false; |
| 2116 | } |
| 2117 | } else { |
| 2118 | wantLabel.push(node); |
| 2119 | } |
| 2120 | } |
| 2121 | this.applyLabelCulling(wantLabel, invScale); |
| 2122 | } |
| 2123 | |
| 2124 | setShowAllLabels(show: boolean): void { |
| 2125 | this.showAllLabels = show; |
no test coverage detected