[Webkit-unassigned] [Bug 81792] Triggering an animation in cloned (uses) object causes all other cloned objects to animate

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 23 04:27:32 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=81792


Nikolas Zimmermann <zimmermann at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID




--- Comment #5 from Nikolas Zimmermann <zimmermann at kde.org>  2012-03-23 04:27:32 PST ---
(In reply to comment #4)
> My understanding is now that "Animations on a referenced element will cause the instances to also be animated." so Firefox and webkit both wrong on that aspect.
> 
> http://www.w3.org/TR/SVG11/struct.html#UseElement


You misunderstood parts of the <use> element.

    <path id="path4011".../>
      <animateTransform
         to="1"
         from="2"
         type="scale"
         dur="1s"
         begin="mouseover"
         attributeName="transform"
         id="animateTransform7986" />
    </path>
    <use y="10" xlink:href="#path4011"...
    <use y="100" xlink:href="#path4011"...
    <use y="200" xlink:href="#path4011"...

What you expect is that when moving the mouse over an "instance", only that specific instance should get animated - I got that. Though using this construct this can't work.

You have to attach this animateTransform to the individual <use> elements, either as child of the <use> element or targeting the use element via xlink:href. Otherwise you'll always end up animating all instances of your path.

Imagine you're changing the "d" attribute of the path from JavaScript. What do you expect? All instances immediately reflect the change -- the same is true for SMIL animations here.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list