I have a script that is not rendering the textwrap in svg properly.
//does not work .....
var svgLand = svgObj.getEleme ntById("NarrDis play");
mytextwrap=
document.create Element("text:w rap"); mytextwrap.setA ttribute("x","2 0");
mytextwrap.setA ttribute("y","3 0");
mytextwrap.setA ttribute("width ","640");
mytextwrap.setA ttribute("style ","fill:#000000 ; font-family:arial;
font-size:14; text-align:left; line-interval:1.25em ;");
mytext=document .createTextNode ("something here");
mytextwrap.appe ndChild(mytext) ;
svgLand.appendC hild(mytextwrap );
//works ....
mynorm_text = document.create Element("text") ;
mynorm_text.set Attribute("x"," 30");
mynorm_text.set Attribute("y"," 90");
mynorm_text.set Attribute("styl e","fill:#00000 0; font-family:arial;
font-size:14; text-align:left;");
mytext=document .createTextNode ("something here");
mynorm_text.app endChild(mytext );
svgLand.appendC hild(mynorm_tex t);
It works when I use this statically:
<text:wrap id="NarrText" x="20" y="30" width="640" style="fill:#00 0000;
font-family:arial; font-size:14; text-align:left;
line-interval:1.25em ;">default text</text:wrap>
Any help appreciated.
Mike
//does not work .....
var svgLand = svgObj.getEleme ntById("NarrDis play");
mytextwrap=
document.create Element("text:w rap"); mytextwrap.setA ttribute("x","2 0");
mytextwrap.setA ttribute("y","3 0");
mytextwrap.setA ttribute("width ","640");
mytextwrap.setA ttribute("style ","fill:#000000 ; font-family:arial;
font-size:14; text-align:left; line-interval:1.25em ;");
mytext=document .createTextNode ("something here");
mytextwrap.appe ndChild(mytext) ;
svgLand.appendC hild(mytextwrap );
//works ....
mynorm_text = document.create Element("text") ;
mynorm_text.set Attribute("x"," 30");
mynorm_text.set Attribute("y"," 90");
mynorm_text.set Attribute("styl e","fill:#00000 0; font-family:arial;
font-size:14; text-align:left;");
mytext=document .createTextNode ("something here");
mynorm_text.app endChild(mytext );
svgLand.appendC hild(mynorm_tex t);
It works when I use this statically:
<text:wrap id="NarrText" x="20" y="30" width="640" style="fill:#00 0000;
font-family:arial; font-size:14; text-align:left;
line-interval:1.25em ;">default text</text:wrap>
Any help appreciated.
Mike
Comment