Skip to content

Commit

Permalink
Merge pull request #44 from tgirgin23/patch-1
Browse files Browse the repository at this point in the history
Wait until the animation has been loaded into DOM
  • Loading branch information
marcjulian authored Apr 1, 2019
2 parents e8b40de + bfb358e commit b7e94a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion projects/lottie/src/lib/lottie.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export class LottieComponent implements OnInit {
this.viewWidth = this.width + 'px' || '100%';
this.viewHeight = this.height + 'px' || '100%';

this.animationCreated.emit(animation);
animation.addEventListener('DOMLoaded', () => {
this.animationCreated.emit(animation);
});
}

}

0 comments on commit b7e94a2

Please sign in to comment.