vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
3 lines (2 loc) • 391 B
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function f(i,o,t,c,l){const n=t-o,u=Math.ceil(n/c*16),r=()=>{typeof l=="function"&&l()};if(!n){r();return}if(c<=0){i.scrollTo(0,t),r();return}let e=o;const s=()=>{n&&(e=e+u,(t-e)/n<=0&&(e=t),i.scrollTo(0,e),e===t?r():requestAnimationFrame(s))};s()}exports.animateScrollTo=f;
//# sourceMappingURL=helper.cjs.map