Changes between Version 6 and Version 7 of SVG properties

Mar 8, 2019 6:59:33 PM (4 years ago)
Said Abou-Hallawa



  • SVG properties

    v6 v7  
    10101. It has its own DOM interface which is separate from getAttribute() and setAttribute() methods.
    11 2. It is a reflection of a DOM attribute. This means, setAttribute() should, affect the SVG property once it is called. Also getAttribute() should reflect the latest changed value of the SVG property. Let's call updating the SVG property from the attribute 'synchronize'. And let's call updating the attribute from the SVG property 'commit'
     112. It is a reflection of a DOM attribute. Two cases need to be handled
     12a. When setAttribute called for the underlaying attribute, SVGElement::parseAttribute() will be called to update th SVG property and then SVGElement::svgAttributeChanged() is called to invalidate the renderer and the dependent SVG objects.
     13b. When the SVG property is changed through the DOM interface. In this handed in two steps: (1) commit and (2) synchronize. The commit step is called immediately after changing the property. It will mark value of the underlaying attribute to be invalid and it call  SVGElement::svgAttributeChanged(). The synchronize. step happens later when the value of attribute is required. The valueAsString(0 of the SVG property is set as the attribute. value.
    12143. Most of the properties are animated properties. The animated property has two members baseVal() and the animal(). Each of them are from the same SVG property type.  animal() differs from baseVal() only when animating. Otherwise they have to be the same value.
    13154. The animal() of the animated property is read only; no changes from the DOM is allowed.