xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arnold Figueroa" <afigue...@altaira.com>
Subject RE: Element's attribute "display"
Date Tue, 07 May 2002 15:19:41 GMT
Thank you very much,  I've got it to work but...
I had to change the "display" to "visibility" in the svg file.

Which brings me back to an older problem:

I am trying to
change a text label within an SVG file and have succeeded in changing
the label when the target XML text node is contained within a text
element. However, I have been less successful when the target XML
text node is contained in a tspan element.

a work-around that involves replacing the tspan element
that is contained within the text element with a cloned and updated
copy of the tspan and XML text nodes. This code successfully causes
updates in the JSVGCanvas:

................... svg file
snippet..............................................
text id="status_text_MVI01_TEST1_ANALYZER_STATE_GUI"
transform="matrix(0.9164 0 0 1 50.2876 70.8574)" display="inline"><tspan
x="0" y="0" font-family="'ArialMT'" font-size="11.8501"
letter-spacing="0.593">INIT</tspan></text>
....................................................................

I was wondering if I can change the label <tspan>INIT</tspan>  using
setAttribute("style", ????);
without having to use the work-around solution above.

and what would be the exact parameter to use for text.



-----Original Message-----
From: Thierry Kormann [mailto:tkormann@ilog.fr]
Sent: Tuesday, May 07, 2002 10:14 AM
To: Batik Users
Subject: RE: Element's attribute "display"



> I'm sorry, but exactly how do I set this up.
> Obiously I cannot use this method: testElement.setAttribute()anymore.

use visibility the same way you are using display.

setAttribute("visibility", "hidden");

instead of setAttribute("display", "none");

and

setAttribute("visibility", "visible")

instead of setAttribute("display", "inline") ...

---

you can also use the style attribute

setAttribute("style", "visibility:hidden"); ....


Thierry.


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message