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

Re: Clarification of "baseVal"

From: Antoine Quint <antoine@graougraou.com>
Date: Mon, 7 Oct 2002 19:13:51 +0200
To: www-svg@w3.org
Message-Id: <269A7EB4-DA18-11D6-9B11-0003931E5C64@graougraou.com>

Hi,

> Antoine,
> 'baseVal' should always be in sync with the current state of
> getAttributeNS() and setAttributeNS(). If you do a setAttributeNS(null,
> 'width', whatever), then 'baseVal' should be updated immediately.
> (Furthermore, any additive animation values should instantly change to
> be relative to the new 'baseVal'.)

Ok, sounds great.

> The notion of a "base value" is discussed at
> http://www.w3.org/TR/smil-animation/#AnimationSandwichModel, which is
> referenced normatively by the SVG 1.0 specification. The 'baseVal'
> property in the SVG DOM represents what the SMIL Animation 
> specification
> refers to as the "base value".

Before I actually took a closer look at all this I was indeed thinking 
that baseVal would return what getAttributeNS would. But some text in 
the spec within the DOM interfaces made it unclear I think. For 
instance, the baseVal property of SVGAnimatedLength is specified as

"The base value of the given attribute before applying any animations"

The "before" actually messed my head! What I ended up thiking was that 
whatever happened (including a setAttributeNS) during the course of an 
animation, baseVal would always return the original value at start of 
the animation. Your explanation above was clearer. I agree it is 
already clearer in the SMIL Animation spec but I would hope for 
interface text to be clearer, don't you think?

Anyway, thanks Jon and Thierry!

Antoine
Received on Monday, 7 October 2002 13:11:57 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:23 GMT