noorzaie/vue-circular-count-down-timer

Finish event not called when decrementing

kgrosvenor opened this issue · 2 comments


<circular-count-down-timer
                stroke-color="#0078f8"
                v-if="item.isActive && item.hasCompleted === false"
                :stroke-width="2"
                :main-circle-id="`timer-${index}`"
                :stop-conditions="getStopConditionsForActivity(index)"
                title="Nice"
                :circles="[
                {
                  id: `timer-${index}`,
                  steps: (item.seconds | item.reps),
                  stepLength: -1,
                  size: 46,
                }
              ]"
                @finish="moveToNextActivity(index)"
                >
</circular-count-down-timer>
getStopConditionsForActivity(index) {
   let data = {};
   let item = this.workout.activitys[index];

   data[`timer-${index}`] = (item.reps | item.seconds)

   return data;
},

In my case it finishes a second early, i have steps set to 2 in one case and it restarts after reaching one, same happens when its 30 and it reaches 29. Any ideas?

I worked around it by using time update, for some reason it wont trigger @finish