Re: SVG12: Locating animation targets

* Antoine Quint wrote:
>Thus, you could write the following content to have a custom element 
>with custom attributes respond to animations:

>       <xbl:handlerGroup>
>         <svg:handler ev:event="TraitMutationEvent"...>
>           var attr = evt.traitLocalName;
>           if (attr == 'width') {
>             var animatedValue = evt.target.getFloatTrait(attr);
>             this.fixWidth(animatedValue);
>           }
>         </svg:handler>

I think you rather need this for the svg:TraitAnimValueChanged event
(or svg:traitanimvaluechanged event) as TraitMutationEvent is the name
of the interface, not the event; but even then this cannot work as
getFloatTrait(...) will always return the base value as defined in
Appendix C.A.7,

  In either case (i.e., XML attributes or CSS properties), the returned
  value corresponds to the base value before animation is applied and
  not the presentation value (aka, animated value), where base value and
  presentation value corresponds to the SMIL Animation definitions of
  these terms (see [ SMILANIM]).

So it seems that such functionality is not available in SVG 1.2...
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 17 January 2005 12:12:08 UTC