@octane-xplat/lottie 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/Lottie.tsrx
CHANGED
|
@@ -34,10 +34,11 @@ function currentProgress(v: LottieView): number {
|
|
|
34
34
|
|
|
35
35
|
/** Stop = pause + reset playhead. iOS `stop()` resets to the start;
|
|
36
36
|
* Android's `cancelAnimation()` ends the animator and the next
|
|
37
|
-
* `playAnimation()` restarts from 0.
|
|
37
|
+
* `playAnimation()` restarts from 0. `nativeViewProtected` is typed
|
|
38
|
+
* per-platform — `stop` only exists on iOS's CompatibleAnimationView. */
|
|
38
39
|
function stopView(v: LottieView) {
|
|
39
40
|
if (isAndroid) v.cancelAnimation();
|
|
40
|
-
else v.nativeViewProtected?.stop();
|
|
41
|
+
else (v.nativeViewProtected as any)?.stop();
|
|
41
42
|
|
|
42
43
|
v.progress = 0;
|
|
43
44
|
}
|