MCPcopy
hub / github.com/opentrace/opentrace / labelGap

Method labelGap

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

* World-space gap from a node's sprite center to the left edge of its * label. Sized so the on-screen gap (gap × vp.scale) equals the sprite's * actual on-screen radius plus a small breathing margin — the label * stays glued to the sprite edge at every zoom level (Fix #27). * * Sprite

(node: PixiNode)

Source from the content-addressed store, hash-verified

836 * jitter by 2–3 character widths as zoom changed.
837 */
838 private labelGap(node: PixiNode): number {
839 return node.size * this.zoomInvScale() + 4 / this.vp.scale;
840 }
841
842 /** Counter-scale all sprites, labels, and edges for current viewport scale.
843 *

Callers 6

applyCounterScaleMethod · 0.95
updatePositionsMethod · 0.95
applyLabelCullingMethod · 0.95
createLabelMethod · 0.95
setupInteractionMethod · 0.95

Calls 1

zoomInvScaleMethod · 0.95

Tested by

no test coverage detected