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

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -