MCPcopy
hub / github.com/opentrace/opentrace / zoomInvScale

Method zoomInvScale

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

* Compute the inverse-scale factor for sprites/labels, adjusted by zoom exponent. * At exponent 1: fully cancels world zoom (fixed screen size). * At exponent 0: no cancellation (world-space scaling).

()

Source from the content-addressed store, hash-verified

804 * At exponent 0: no cancellation (world-space scaling).
805 */
806 private zoomInvScale(): number {
807 // exponent 1 = fixed screen size (fully cancel world zoom)
808 // exponent 0 = full world-space (no cancellation — nodes scale with zoom)
809 // Simplified: (1/vpScale)^exponent
810 return Math.pow(1 / this.vp.scale, this.zoomSizeExponent);
811 }
812
813 /**
814 * Inverse-scale for labels only — always fully cancels viewport zoom

Callers 9

_initMethod · 0.95
labelGapMethod · 0.95
applyCounterScaleMethod · 0.95
applyPingAnimationsMethod · 0.95
applyVisualsMethod · 0.95
redrawAllEdgesMethod · 0.95
redrawDragEdgesMethod · 0.95
update3DMethod · 0.95
redrawAllEdges3DMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected