Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Blinking time colon

I'm trying to make the colon in the time blink on and off.

 

This is what I came up with. Is there a better way?

 

<text id="timeColon" text-anchor="middle" text-length="1" opacity="1">:
    <animate attributeName="opacity" begin="load+1" from="1" to="0" dur="0" repeatCount="indefinite" repeatDur="2" />
    <animate attributeName="opacity" begin="load+2" from="0" to="1" dur="0" repeatCount="indefinite" repeatDur="2" />
</text>

 

 

Also, three things in the documentation need to be improved:

 

1. I struggled to get `repeatDur` working because there is no example in the documentation and it is unclear what its relationship with `repeatCount` is. The documentation says "repeatCount or repeatDur", but I think it means "repeatCount and optionally repeatDur"?

 

2. The values for `final` are listed in the documentation, but there are no definitions for what `freeze`, `remove`, `restore`, and `keep` mean as attributes.

 

3. When does the `repeatDur` start? At the time of the start of the animation or the conclusion of the animation?

Best Answer
0 Votes
1 REPLY 1

If that's working for you, then it's all good. You could also just show/hide the element in JS.

https://github.com/Fitbit/sdk-lcd-clock/blob/master/app/index.js#L73

 

Thanks for the documentation feedback, I've logged those for a future update.

Best Answer
0 Votes