MCPcopy
hub / github.com/JedWatson/react-select / animateScroll

Function animateScroll

packages/react-select/src/utils.ts:248–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246 let currentTime = 0;
247
248 function animateScroll() {
249 currentTime += increment;
250 const val = easeOutCubic(currentTime, start, change, duration);
251 scrollTo(element, val);
252 if (currentTime < duration) {
253 window.requestAnimationFrame(animateScroll);
254 } else {
255 callback(element);
256 }
257 }
258 animateScroll();
259}
260

Callers 1

animatedScrollToFunction · 0.85

Calls 2

easeOutCubicFunction · 0.85
scrollToFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…