Re: Clarification of "baseVal"

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 UTC