Bug Data
ID: |
#0156 |
Status: |
Fixed |
Severity: |
Normal |
Reporter: |
Danny Drobnitch
|
Submitted: |
04-11-09 22:06 |
|
Product Data
Product: |
|
Ample SDK |
Component: |
|
SVG 1.1 |
Version: |
|
0.8.x |
OS: |
|
> Any |
Browser: |
|
> Any |
|
|
Description
Cannot set attributes on detached Ample SVG elements |
|
Ample SDK throws and error when trying to set the attributes of a SVG element before it is attached to the DOM using either setAttribute or setAttributeNS.
EX.
var newNode = ample.createElementNS("http://www.w3.org/2000/svg", "circle");
newNode.setAttribute("r","60");
var container = ample.getElementById("container");
container.appendChild(newNode);
I looked at the code a bit and this may be a possible solution, but I am unsure of the implications. It might be possible to change the setAttribute method in the cSVGElement.js file to:
var oElement;
if (sName != "id" && sName != "class")
if(oElement = this.$getContainer())
oElement.setAttribute(sName, sValue); |
|
|
Messages written for this bug
Reporter: |
Lev Matematik
|
Submitted: |
05-11-09 15:00 |
Message: |
This only happened on non-IE browsers. Fixed now by adding a check for the shadow DOM presence. |
|
Add a message
|