W3C home > Mailing lists > Public > www-svg@w3.org > October 2010

Re: <animateMotion> specification clarification

From: Shane Stephens <shans@google.com>
Date: Tue, 12 Oct 2010 18:22:58 +1100
Message-ID: <AANLkTi=RTjsYXKQh2gRDRVzHpwDUUXqN7UOrqDUDri6=@mail.gmail.com>
To: Nikolas Zimmermann <zimmermann@physik.rwth-aachen.de>
Cc: www-svg@w3.org
Hi Nikolas,

> This example is not correct, how shall the user agent know to which element
> the animation should be applied?
> It works as expected if you'd assign xlink:href="#MyTriangle" to your
> <animateMotion> element.
> You either have to specify a target for your animation element using
> xlink:href=#someIRI" or include it as child element of the target element.
> I just played a bit around with your test in Opera, and it's confusing:
> If I try:
>  <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow", stroke="red"
> stroke-width="7.06" id="MyTriangle"/>
> <rect width="30" height="30"/>
>  <animateMotion dur="6s" repeatCount="indefinite" rotate="auto" ><mpath
> xlink:href="#path1"/></animateMotion>
> Then Opera animates both the path & the rect, using the same animateMotion
> operation.
> Sounds like a bug to me, unless I'm missing some SMIL detail. Erik?

if you look at the relevant fragment:

 <svg id="MySymbol">
   <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow"
stroke="red" stroke-width="7.06" id="MyTriangle" >
    <animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
      <mpath xlink:href="#path1"/>

then the animateMotion lives inside a container (the 'svg' element).
indicates that svg elements can be animated, and this is why it seems
that Opera's behaviour is correct - the container (and hence its
children) is animated.  This also explains why adding the rect to that
container causes both to be animated.

Received on Tuesday, 12 October 2010 07:31:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:28 UTC