- From: Blaine Brodie <bbrodie@savagesoftware.com>
- Date: Thu, 26 Oct 2000 09:09:26 -0700
- To: www-svg@w3.org
The current SVG specification does not mention this, but I assume that an SVGElement's attributes must be synchronized with their corresponding SVG objects. For example, an SVGCircleElement's 'cx' attribute must be synchronized with its 'cx' SVGAnimatedLength object. So, if I perform the following calls on SVGCircleElement named 'circle': circle.setAttribute("cx", "100"); circle.getCx().getBaseVal().setValue(50); then circle.getAttribute("cx") should return '50'. Right? This leads me into another question regarding outstanding references to SVG objects. What is expected to happen to these references when the attribute's string value becomes updated. Do these objects simply get detached from their parent elements or do they get updated with new values? Here's an example: circle.setAttribute("cx", "50"); SVGLength length = circle.getCx().getBaseVal(); //got a reference length.getValue(); //returns 50 circle.setAttribute("cx", "100"); //set the 'cx' attribute. Is the outstanding 'length' reference updated or detached from its parent element? length.getValue(); //returns '50' or '100'? If the objects simply get detached, then the last call would return '50'. If outstanding references are updated then the last call would return '100'. Thanks for the clarification. --- Blaine
Received on Thursday, 26 October 2000 12:11:03 UTC