@progress/kendo-vue-animation
Version:
Kendo UI for Vue Animation package
9 lines (8 loc) • 807 B
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=(e,n=0,t=0)=>{const l=e.duration;let o,d,i=n&&1-n;e.onStart&&e.onStart();const r=a=>{o||(o=a),d=a-o+1;const c=d/l+i;c<=1?(e.onUpdate&&e.onUpdate(c),t=window.requestAnimationFrame(r),n=c):(e.onEnd&&e.onEnd(1),n=0)};return t=window.requestAnimationFrame(r),t},w=e=>{e&&window.cancelAnimationFrame(e)};exports.animate=u;exports.cancelAnimation=w;