Hello,

I work on a Java application based upon batik. It contains a JSVGCanvas
displaying the content of a SVGDocument. That document might be modified.
All modifications are performed in Batik's update manager thread.
We have some strange behavior when updating the document.
Let's have a look at the following picture (START.png) that exemplifies what
we do :
http://www.nabble.com/file/p22987781/START.png START.png   
In that picture, you can notice a floodgate symbol in the background (it
appears in black). We have added some SVG content to show that the floodgate
is opened. That additional content is made up of a :
- a red triangle (path element),
- a text : "17.1 0". That text is made up 2 text spans : "17.1" and "0".
We then try to hide the text span "17.1" by setting the value of its display
element to none. We also modify the dx attribute so as to center the text
"0"
Here is what we get in our application (APPLICATION_VIEW.png)
http://www.nabble.com/file/p22987781/APPLICATION_VIEW.png
APPLICATION_VIEW.png 
As you can see, the behavior is a little bit strange. What we see is a
combination of the target view "0" in the center and of the previous view
("17.1 O").
However, the SVGDocument seems to be correct. We write the content of the
SVGDocument to a SVG file each time a modification is performed. Here is the
corresponding part of the SVG file :

<g id="TMa255a744-0b63-42aa-abf9-4c6823ecc28a">
<g id="TM59" transform="translate(427.53 ,208.3) rotate(0)">
<path fill="rgb(160,0,0)" stroke-width="0.2" d="M-5.5,-3 L5.5,-3 L5.5,3 z"
stroke="rgb(160,0,0)"/>
<text style="text-anchor: middle; font-size: 3.3; fill: rgb(160,0,0)"
id="TMTEXT59" transform="translate(0,11.0) scale(1,-1)">
<tspan display="none">17.1</tspan>
<tspan dx="0" display="none">O</tspan>
</text>
</g>
</g>

Moreover, everything's ok when we load the document in squiggle
(SQUIGGLE_VIEW.png)
http://www.nabble.com/file/p22987781/SQUIGGLE_VIEW.png SQUIGGLE_VIEW.png 

Everything happens as if there were several GraphicsNode instances for the
text Element the id of which id "TMTEXT59"
In fact, we can detect events for each element. We can click on the text
element corresponding to the "previous view" ("17.1 O") and we can also
click on the text element corresponding to the target view ("0"). In both
cases, the id of the Element is the same : "TMTEXT59".
Has somebody ever met such a strange situation? 

Thanks for your help.

Regards.

Romain CATTEAU.


-- 
View this message in context: 
http://www.nabble.com/Several-GraphicsNode-instances-per-Element---tp22987781p22987781.html
Sent from the Batik - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to