Function animateEvents
- animateEvents(
 fn: (
 node: Element,
 data: { from: DOMRect; to: DOMRect },
 ...rest: any,
 ) => AnimationConfig,
 store?: MinimalWritable<boolean>,
 ): (
 node: Element,
 data: { from: DOMRect; to: DOMRect },
 ...rest: any,
 ) => AnimationConfigParameters- fn: (
 node: Element,
 data: { from: DOMRect; to: DOMRect },
 ...rest: any,
 ) => AnimationConfigA Svelte animation function. 
- Optionalstore: MinimalWritable<boolean>- An optional boolean minimal writable store that is set to true when animation is active. 
 Returns (
 node: Element,
 data: { from: DOMRect; to: DOMRect },
 ...rest: any,
 ) => AnimationConfigWrapped animation function. 
- fn: (
Svelte doesn't provide any events for the animate directive.
The provided function below wraps a Svelte animate directive function generating bubbling events for start & end of animation.
These events are
animate:startandanimate:end.This is useful for instance if you are animating several nodes in a scrollable container where the overflow parameter needs to be set to
nonewhile animating such that the scrollbar is not activated by the animation.Optionally you may also provide a boolean writable store that will be set to true when animation is active. In some cases this leads to an easier implementation for gating on animation state.