Hello Thomas,

Yes, it works with that small change, thanks for the advice.
Am I right to assume that this bug will be corrected in next version?

Cheers,

Nacho


Thomas DeWeese wrote:

Hi Nacho,

   This is a bug I think, 'svgCanvas.select' goes through a route
that fails to set 'selectedNode' in the
org.apache.batik.gvt.text.ConcreteTextSelector.  As a result
when you ask to clear the selection it thinks it doesn't have
one.

   If you are up for a small code change I think you can fix this
easily, just add:

        selectionNode = node;

   at line 153 in ConcreteTextSelector.

   Let me know if this does or doesn't work for you.



Nacho wrote:

Hello,

I have a weird problem with JSVGCanvas and text selection.

I have a piece of code that highlights a text node using the code:

Mark startMark = textNode.getMarkerForChar(aci.getBeginIndex(), true);
Mark endMark = textNode.getMarkerForChar(aci.getEndIndex(), false);

svgCanvas.select(startMark, endMark);

This highlights the text. It would come back to its non-highlighted status using:

svgCanvas.deselectAll();

This code worked perfectly with Batik 1.5, but the svgCanvas.deselectAll() doesn't have any effect with Batik 1.5.1 libraries.
The code is the same, but with the old distribution of libraries it works, while with the new it doesn't.


Reading the changes, I see in Batik 1.5.1 README.txt "Clearing text selection now works".

What can be the cause of that? Maybe some errors were solved with the new release, but it is supposed to be used diferently?

Thanks in advance for any replay,

Ignacio Leon



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--

-------------------------------------------------------------------------------
Ignacio Leon


CERN -- European Laboratory for Particle Physics
IT/CS Network Services and Operation
Mailbox: G23910
CH-1211 Genève 23, Switzerland Office : (+41) (0) 22 76 75 590 [EMAIL PROTECTED] -------------------------------------------------------------------------------



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to