f7fadc5d4c2ed13a1006826a8393dcc76b2fae6a37ddf9da7f54681f870fefa1f798a605d5f81e52f1f0ecab338f734761a94aa7f6aa4c69f2fa6fe23f8b9c 1.0 KB

12345678910111213141516171819
  1. import { AnimationEasing } from 'zrender/lib/animation/easing.js';
  2. import Element from 'zrender/lib/Element.js';
  3. import { AnimationOption, AnimationOptionMixin } from '../util/types.js';
  4. import type Model from '../model/Model.js';
  5. declare type AnimationKeyframe<T extends Record<string, any>> = T & {
  6. easing?: AnimationEasing;
  7. percent?: number;
  8. };
  9. export interface ElementKeyframeAnimationOption<Props extends Record<string, any>> extends AnimationOption {
  10. loop?: boolean;
  11. keyframes?: AnimationKeyframe<Props>[];
  12. }
  13. /**
  14. * Stop previous keyframe animation and restore the attributes.
  15. * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set.
  16. */
  17. export declare function stopPreviousKeyframeAnimationAndRestore(el: Element): void;
  18. export declare function applyKeyframeAnimation<T extends Record<string, any>>(el: Element, animationOpts: ElementKeyframeAnimationOption<T> | ElementKeyframeAnimationOption<T>[], animatableModel: Model<AnimationOptionMixin>): void;
  19. export {};