RE: "to" animation question

Hi Antoine -

At first blush, I believe that the observed behavior is correct. When an
animation restarts, it does not create a new instance in the animation
sandwich. "to" animations are defined to use the underlying value as the
beginning point. When you restart the "200" animation, it must first stop
the first instance; this removes the effect of the first instance from the
animation sandwich. The underlying value reverts to 50, and so the new
instance of the "200" animation effectively replays the last animation as
you described.

Patrick

> -----Original Message-----
> From: www-smil-request@w3.org [mailto:www-smil-request@w3.org]On Behalf
> Of Antoine Quint
> Sent: Monday, March 18, 2002 7:43 AM
> To: www-svg@w3.org; www-smil@w3.org
> Subject: "to" animation question
>
>
> Hi there,
>
> I think I encountered a bug in the Adobe SVG Viewer 3.0, but I would
> like to check here with animation wizards. Consider this bit of code:
>
> =======================
>
> <svg width="800" height="600">
>
>   <text id="link1" x="10" y="50">50</text>
>   <text id="link2" x="10" y="100">100</text>
>   <text id="link3" x="10" y="150">150</text>
>   <text id="link4" x="10" y="200">200</text>
>
>   <rect x="300" y="-50" width="50" height="50">
>     <animate attributeName="y" to="50" dur="0.1s" begin="link1.click"
> fill="freeze" />
>     <animate attributeName="y" to="100" dur="0.1s" begin="link2.click"
> fill="freeze" />
>     <animate attributeName="y" to="150" dur="0.1s" begin="link3.click"
> fill="freeze" />
>     <animate attributeName="y" to="200" dur="0.1s" begin="link4.click"
> fill="freeze" />
>   </rect>
>
> </svg>
>
> =======================
>
> Now do the following:
>
> 1. click on "50"
> 2. click on "200"
> 3. click on "200" again
>
> What I would expect from my code here is to have the rectangle stand
> still in between steps 2 and 3, as I understand that this kind of "to"
> animation takes the last animated value as the underlying value for
> computation. The weird thing that is happening is that the rectangle
> actually replays the last animation instead! I have looked at the SMIL
> Animation specification and it seems to be the incorrect behavior.
> Anyone can confirm that this is an Adobe SVG Viewer bug? If not, can
> anyone shed some light on what is wrong with my code? Thanks,
>
> Antoine

Received on Monday, 18 March 2002 12:41:27 UTC