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

Re: Clarification of "baseVal"

From: Chris Lilley <chris@w3.org>
Date: Mon, 7 Oct 2002 19:46:37 +0200
Message-ID: <131216874453.20021007194637@w3.org>
To: www-svg@w3.org, Antoine Quint <antoine@graougraou.com>

On Monday, October 7, 2002, 7:13:51 PM, Antoine wrote:


AQ> 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'.)

AQ> Ok, sounds great.

Specifically, you should now be able to give the values of
rect.width.baseVal and rect.width.animatedVal at t=1.5 seconds (0.5
seconds after the DOM changed the value to 500, and while the
animation is still continuing).

>> 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".

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

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

AQ> The "before" actually messed my head!


Aha - thanks for pointing out the ambiguity (it seemed clear to me,
but you have shown another valid interpretation of the words).

'Before' is intended to mean 'without taking into account the effect
of any animations' not 'the value that it had in the DOM microseconds
before the time at which the animation started, ignoring any
subsequent changes'.

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

Suggestions for clearer text?

-- 
 Chris                            mailto:chris@w3.org
Received on Monday, 7 October 2002 13:46:32 GMT

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