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

Function calculateScrollPosition

frontend/src/utils/guideUtils.js:282–289  ·  view source on GitHub ↗
(now, start)

Source from the content-addressed store, hash-verified

280};
281
282export const calculateScrollPosition = (now, start) => {
283 const roundedNow = roundToNearest(now, 30);
284 const nowOffset = diff(roundedNow, start, 'minute');
285 const scrollPosition =
286 (nowOffset / MINUTE_INCREMENT) * MINUTE_BLOCK_WIDTH - MINUTE_BLOCK_WIDTH;
287
288 return Math.max(scrollPosition, 0);
289};
290
291export const matchChannelByTvgId = (channelIdByTvgId, channelById, tvgId) => {
292 const channelIds = channelIdByTvgId.get(String(tvgId));

Callers 1

TVChannelGuideFunction · 0.90

Calls 2

roundToNearestFunction · 0.90
diffFunction · 0.90

Tested by

no test coverage detected