UNPKG

ngx-lottie

Version:

<h1 align="center"> <img src="https://raw.githubusercontent.com/ngx-lottie/ngx-lottie/master/docs/assets/lottie.gif"> </h1>

68 lines (67 loc) 2.58 kB
import { OnDestroy, SimpleChanges, NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { AnimationOptions, BMCompleteEvent, BMCompleteLoopEvent, BMEnterFrameEvent, BMSegmentStartEvent, BMDestroyEvent, BMRenderFrameErrorEvent, BMConfigErrorEvent } from './symbols'; import { AnimationLoader } from './animation-loader'; export declare class BaseDirective implements OnDestroy { private ngZone; private platformId; private animationLoader; options: AnimationOptions | null; containerClass: string | null; styles: Partial<CSSStyleDeclaration> | null; /** * `animationCreated` is dispatched after calling `loadAnimation`. */ animationCreated: Observable<import("lottie-web").AnimationItem>; /** * `complete` is dispatched after completing the last frame. */ complete: Observable<BMCompleteEvent>; /** * `loopComplete` is dispatched after completing the frame loop. */ loopComplete: Observable<BMCompleteLoopEvent>; /** * `enterFrame` is dispatched after entering the new frame. */ enterFrame: Observable<BMEnterFrameEvent>; /** * `segmentStart` is dispatched when the new segment is adjusted. */ segmentStart: Observable<BMSegmentStartEvent>; /** * Original event name is `config_ready`. `config_ready` is dispatched * after the needed renderer is configured. */ configReady: Observable<void>; /** * Original event name is `data_ready`. `data_ready` is dispatched * when all parts of the animation have been loaded. */ dataReady: Observable<void>; /** * Original event name is `DOMLoaded`. `DOMLoaded` is dispatched * when elements have been added to the DOM. */ domLoaded: Observable<void>; /** * `destroy` will be dispatched when the component gets destroyed, * it's handy for releasing resources. */ destroy: Observable<BMDestroyEvent>; /** * `error` will be dispatched if the Lottie player could not render * some frame or parse config. */ error: Observable<BMRenderFrameErrorEvent | BMConfigErrorEvent>; private destroy$; private loadAnimation$; private animationItem$; constructor(ngZone: NgZone, platformId: string, animationLoader: AnimationLoader); ngOnDestroy(): void; protected loadAnimation(changes: SimpleChanges, container: HTMLElement): void; private getAnimationItem; private awaitAnimationItemAndStartListening; private setupLoadAnimationListener; private destroyAnimation; }