bill hai 4 meses
pai
achega
5ebd9d04e4
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/sdk/association/animation.ts

+ 4 - 0
src/sdk/association/animation.ts

@@ -425,6 +425,10 @@ export const endTime = computed(() => {
 export const play = ref(false);
 export const play = ref(false);
 watch(play, (_a, _b, onCleanup) => {
 watch(play, (_a, _b, onCleanup) => {
   play.value ? animationGroup?.play() : animationGroup?.pause();
   play.value ? animationGroup?.play() : animationGroup?.pause();
+  if (!play.value) return;
+  if (currentTime.value >= endTime.value) {
+    currentTime.value = 0
+  }
   onCleanup(
   onCleanup(
     watchEffect(() => {
     watchEffect(() => {
       if (currentTime.value >= endTime.value) {
       if (currentTime.value >= endTime.value) {