svg - Snapsvg - get height and width of text element -


i altering elements contents using

svgtextlines[name].node.innerhtml = line.val(); svgtextlines[name].node.textcontent = line.val(); 

and trying height , width of element after content has changed cant seem find property in elemement.node object gets updated. element has not transformed can understand why there way can information?

regards

i'm using snapsvg , had same problem. can use getboundingclientrect object parameter.

var s = snap("#svg"); snap.load("mascot.svg", function (f) {   s.append(f);   var rect = s.searchall("g")[0];   var dimens = rect.node.getboundingclientrect();        console.log(dimens.width) }); 

Comments

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

Change font size on axis for excel chart with powershell -