Question about a "to" animation

I'm trying to use SMIL inside SVG, following [1].

Here is the document:


<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
<rect x="0" y="10" width="300" height="300" fill="green">
  <animate id="a1" attributeName="width" to="700" dur="4s"
begin="mouseover" end="mouseout" fill="freeze"/>
  <animate id="a2" attributeName="width" to="300" dur="4s"
begin="mouseout" end="mouseover" fill="freeze" />
</rect>
</svg>

>From what I understand from the spec, these "to" animations should
operate as follows:

1) a1 starts when the rect is moused over
2) a2 starts when the rect is moused out
3) a1 finishes at whatever happens first:
    - when moused out or
    - 4 seconds after the rect is moused over
4) a2 finishes at whatever happens first:
    - when moused in or
    - 4 seconds after the rect is moused out
5) the presentational (underlying?) value of the rect's width is
frozen when either animation is finished
6) when either animation starts, the "underlying" value is used as a
starting width

Are all of the above true?

The behavior I'm experiencing (on Opera 9.5, that is) is as follows:

Time 0s:  mouse into the rect (width="300" and it starts growing)
Time 3s:  mouse out of the rect (width="600" and it starts shrinking)
Time 5s:  mouse into the rect (width jumps to 300 and starts growing)

It's the "jumping" part that doesn't seem right to me.  I think upon
the second mouse-in that the animation should start at whatever its
current presentational/underlying vlaue is (450 in this case).

Batik 1.7 is even worse (it doesn't freeze values).  Can anyone
clarify for me what the behavior should be?

Thanks,
Jeff Schiller

[1] http://www.w3.org/TR/2001/REC-smil-animation-20010904/#AnimFuncValues

Received on Wednesday, 13 February 2008 21:00:55 UTC