MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / calculateLeftScrollPosition

Function calculateLeftScrollPosition

frontend/src/utils/guideUtils.js:320–325  ·  view source on GitHub ↗
(program, start)

Source from the content-addressed store, hash-verified

318};
319
320export const calculateLeftScrollPosition = (program, start) => {
321 const programStartMs = program.startMs ?? convertToMs(program.start_time);
322 const startOffsetMinutes = (programStartMs - convertToMs(start)) / 60000;
323
324 return (startOffsetMinutes / MINUTE_INCREMENT) * MINUTE_BLOCK_WIDTH;
325};
326
327export const calculateDesiredScrollPosition = (leftPx) => {
328 return Math.max(0, leftPx - 20);

Callers

nothing calls this directly

Calls 1

convertToMsFunction · 0.90

Tested by

no test coverage detected