source: [view]
if(!obj){ return; }
if(obj.documentElement){ obj=obj.documentElement; }
this.readCommonAttrs(obj);
for(var i=0; i var c=obj.childNodes[i];
if(c.localName=="text"){
this.property('label',c.childNodes.length?c.childNodes[0].nodeValue:'');
}
else if(c.localName=="path"){
// the line
var d=c.getAttribute('d').split(" ");
var s=d[0].split(",");
this.start.x=parseFloat(s[0].substr(1),10);
this.start.y=parseFloat(s[1],10);
s=d[1].split(",");
this.control.x=parseFloat(s[0].substr(1),10);
this.control.y=parseFloat(s[1],10);
s=d[2].split(",");
this.end.x=parseFloat(s[0],10);
this.end.y=parseFloat(s[1],10);
var stroke=this.property('stroke');
var style=c.getAttribute('style');
var m=style.match(/stroke:([^;]+);/);
if(m){
stroke.color=m[1];
this.property('fill',m[1]);
}
m=style.match(/stroke-width:([^;]+);/);
if(m){
stroke.width=m[1];
}
this.property('stroke',stroke);
}
}