web: Improve stop animation behavior

`stop` worked like `pause`, when stopping animation, frame should be at 0
This commit is contained in:
Jinny You 2024-01-04 15:40:06 +09:00 committed by Hermet Park
parent 2e2d19b98c
commit 44a8f9ffe1

View file

@ -476,7 +476,7 @@ export class LottiePlayer extends LitElement {
this.currentState = PlayerState.Stopped; this.currentState = PlayerState.Stopped;
this.currentFrame = 0; this.currentFrame = 0;
this._counter = 1; this._counter = 1;
this._TVG.frame(0); this.seek(0);
this.dispatchEvent(new CustomEvent(PlayerEvent.Stop)); this.dispatchEvent(new CustomEvent(PlayerEvent.Stop));
} }