W3C home > Mailing lists > Public > www-svg@w3.org > January 2005

Re: SVG12: Locating animation targets

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Mon, 17 Jan 2005 13:12:15 +0100
To: Antoine Quint <ml@graougraou.com>
Cc: www-svg@w3.org
Message-ID: <41ffa709.409128750@smtp.bjoern.hoehrmann.de>

* 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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:01 UTC