Re: <animateMotion> specification clarification

Hi Shane,

--Original Message--:
>Hi Alex,
>
>So Opera's rendering (both examples render in the same way) is
>correct, and WebKit has a bug?

Yes from what I expect. Niko's other comment about the path
and rect both doing motion is what's expected. The parent <svg>
is the thing being 'animateMotion'ed.

Alex

>Cheers,
>    -Shane
>
>On Tue, Oct 12, 2010 at 6:23 PM, Alex Danilo <alex@abbra.com> wrote:
>> Hi Niko & Shane,
>>
>>        Now I see the difference, child relationships.
>>
>>        Anyway see inline:
>>
>> --Original Message--:
>>>Hi Shane,
>>>
>>>I think you are misunderstanding something:
>>>
>>>>    <path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z" fill="yellow"
>>>> stroke="red" stroke-width="7.06" id="MyTriangle" >
>>>>    </path>
>>>>     <animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
>>>>       <mpath xlink:href="#path1"/>
>>>>     </animateMotion>
>>>
>>>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.
>>
>> The animateMotion should be applied to the parent element which in
>> that case is the <svg>. Since that's a container element all the
>> content should have the animateMotion applied. So the example is OK.
>>
>>>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?
>>>
>>>
>>>>    <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"/>
>>>>      </animateMotion>
>>>>    </path>
>>>
>>>Here, you are including the animateMotion element as <path> child, so
>>>it works fine.
>>
>> Yes, but in the other case, the <svg> is just a parent container and so it
>> should host the motion for its child <path>.
>>
>> Alex
>>
>>>Cheers,
>>>Niko
>>>
>>>
>>>
>>>
>>
>>
>
>
>

Received on Tuesday, 12 October 2010 07:27:42 UTC