MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / scrollSpeed

Function scrollSpeed

src/handlers/editorFileTab.js:484–488  ·  view source on GitHub ↗
(diff)

Source from the content-addressed store, hash-verified

482 const leftDiff = parentLeft - tabLeft;
483
484 const scrollSpeed = (diff) => {
485 const t = Math.min(diff / tabWidth, 1);
486 const eased = t * t;
487 return MIN_SCROLL_SPEED + eased * (MAX_SCROLL_SPEED - MIN_SCROLL_SPEED);
488 };
489
490 if (leftDiff > 0 && scrollX > MIN_SCROLL) {
491 scroll = -scrollSpeed(leftDiff);

Callers 1

getScrollFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected