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

ISSUE with SVGLength

From: Jonathan Watt <jonathan.watt@strath.ac.uk>
Date: Fri, 08 Apr 2005 20:34:31 +0100
Message-ID: <4256DCC7.9080308@strath.ac.uk>
To: www-svg@w3.org

Dear SVG WG,

I have found a problem in the specification of SVGLength. The issue 
arises when the unitType happens to be a value other than 
SVG_LENGTHTYPE_NUMBER or SVG_LENGTHTYPE_PX, and the SVGLength does not 
have sufficient context to allow conversion to and from user units and 
it's unit type. For example, consider the following short script.

   var length = document.documentElement.createSVGLength();
   length.newValueSpecifiedUnits(length.SVG_LENGTHTYPE_PERCENTAGE, 100);
   alert(length.value);  // so what's its value in user units?

This situation may also happen when the SVGLength belongs to an element 
that exists in a document fragment that is not embeded in a document.

The behavior of value, valueAsString, newValueSpecifiedUnits or 
convertToSpecifiedUnits when insufficient context exists should be 
defined. Perhaps a new exception is in order here?

Regards,
Jonathan
Received on Friday, 8 April 2005 19:31:43 GMT

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