xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nacho <Ignacio.L...@cern.ch>
Subject Re: Canvas -> deselectAll Problem
Date Fri, 09 Jul 2004 09:43:55 GMT
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: 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
>

-- 

 -------------------------------------------------------------------------------
 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          
 Ignacio.Leon@cern.ch 
 -------------------------------------------------------------------------------


---------------------------------------------------------------------
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