MCPcopy
hub / github.com/opentrace/opentrace / runLabelCull

Method runLabelCull

ui/src/components/pixi/PixiRenderer.ts:2104–2122  ·  view source on GitHub ↗

Actually run the label cull.

()

Source from the content-addressed store, hash-verified

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;

Callers 2

throttledLabelCullMethod · 0.95
debouncedLabelCullMethod · 0.95

Calls 3

labelInvScaleMethod · 0.95
applyLabelCullingMethod · 0.95
pushMethod · 0.80

Tested by

no test coverage detected