On Sun, Sep 25, 2016 at 4:06 PM, Brian Marick <mar...@roundingpegs.com>
wrote:

> I’m wondering how to do this. SVG lines are driven by x1, x2, y1, and y2
> coordinates, but those aren’t animatable properties in
> `elm-style-animation`.
>
> Perhaps I could have each hand in the clock have a `fill “none”`
> counterweight extending past the center of the clock face, so that I can
> rotate the whole thing around its center. I’m clumsy enough with Elm, SVG,
> elm-style-animation that I’m hoping someone can confirm/deny that will work
> before I start in on it.
>

You should be able to animate without elm-style-animation, albeit with a
little more manual work. I'd go that direction rather than spinning the
clock around and adding counterweights. It shouldn't be too difficult--if
the clocks representation of time is "minutes past midnight" (rather than
hours and minutes) you can set an integer as the "destination time" and
with each millisecond increase (or decrease) the current time until it
reaches the "destination time". Elm is clever about how it re-renders
things, including SVG, so you will get an animation rather than a complete
re-draw of everything on screen.

Duane

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to