W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2009

ISSUE-2216 (valueAsString-affecting-unitType): Not clear whether assigning to SVGLength.valueAsString can change the unitType [SVG Full 1.1]

From: SVG Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Thu, 5 Feb 2009 23:55:23 +0000 (GMT)
To: public-svg-wg@w3.org
Message-Id: <20090205235523.85DEDC6DB9@barney.w3.org>


ISSUE-2216 (valueAsString-affecting-unitType): Not clear whether assigning to SVGLength.valueAsString can change the unitType [SVG Full 1.1]

http://www.w3.org/Graphics/SVG/WG/track/issues/2216

Raised by: Cameron McCormack
On product: SVG Full 1.1

When assigning to SVGLength.valueAsString (or SVGAngle.valueAsString), the unitType should be changed to whatever was parsed from the given string.  For example:

  var l = /* an SVGLength object */;
  l.valueAsString = '1em';
  assert(l.unitType == SVGLength.SVG_LENGTHTYPE_EMS);
  assert(l.valueInSpecifiedUnits == 1);

But the current text describing valueAsString says:

  The value as a string value, in the units expressed by unitType. Setting this
  attribute will cause value and valueInSpecifiedUnits to be updated
  automatically to reflect this setting.

which doesn't make this clear.

There's also no indication of what exception would be thrown if the given SVGLength string couldn't be parsed, or what exactly is the acceptable syntax.
Received on Thursday, 5 February 2009 23:55:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 5 February 2009 23:55:39 GMT