MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / applyRangeToDom

Function applyRangeToDom

src/components/createDataZoomSlider.ts:117–122  ·  view source on GitHub ↗
(range: ZoomRange)

Source from the content-addressed store, hash-verified

115 let activeDragCleanup: (() => void) | null = null;
116
117 const applyRangeToDom = (range: ZoomRange): void => {
118 const r = normalizeRange(range);
119 const span = clamp(r.end - r.start, 0, 100);
120 windowEl.style.left = `${r.start}%`;
121 windowEl.style.width = `${span}%`;
122 };
123
124 const getTrackWidthPx = (): number | null => {
125 // getBoundingClientRect() is robust even if the container is scaled.

Callers 1

createDataZoomSliderFunction · 0.85

Calls 2

normalizeRangeFunction · 0.85
clampFunction · 0.70

Tested by

no test coverage detected