It's working fine. I've added "cursor:default" on all "text" elements of my document, and the result is exactly the one I want !
Something funny is that the Adobe SVG Viewer is not able to manage correctly this style : I confirm that batik is really great !
Regards
Laurent
On 1/21/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
Hi Laurent,
Laurent Caron < [EMAIL PROTECTED]> wrote on 01/20/2006 09:05:05 AM:
> Sorry for my big mistake : I wanted to say
> I set the flag "selectableText" to FALSE
Ok.
> So the user can not select the text (which is good) but when the cursor
is
> over a text the cursor changes. It is weird because this cursor means
"you
> can select the text", so the user try to select a text, and it is not
> possible. I would like to know if it possible to keep the "normal" arrow
> cursor when the mouse pointer is over a text.
Yes, it is possible. You have two main options.
1) Disable pointer-events for the text element (add
pointer-events="none"
to your text elements - actually if you don't need dynamic
behavior
you can add this to your root SVG element).
2) Explictly set the cursor to use: cursor="pointer" This can be
done
either on your root SVG element (although this will 'disable'
the link cursor) or on the individual text elements.
Both of these are really CSS properties so you could use a bit of
CSS magic to do either with a CSS selector:
<style type="text/css"><![CDATA[
text { cursor: pointer; }
]]></style>
>
> Thanks
>
> Laurent
>
> On 1/20/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
> Hi Laurent,
>
> Laurent Caron <[EMAIL PROTECTED]> wrote on 01/20/2006 08:09:34 AM:
>
> > I've almost finish my project, which uses Batik, which is really a
> fantastic
> > library : hey guys, congratulations for your great work !
>
> Thanks!
>
> > I've got a strange behavior. If I've got some "text" tags in my
> document, and
> > the user should not select the text displayed.
> > So in the constructor of my JSVGCanvas, I set the flag
"selectableText"
> to
> > true: it works fine.
>
> If you do not want the user to select text why do you set
> selectableText
> to 'true'? I suspect a typo somewhere in this message but I am unsure
> where exactly...
>
> > But when the cursor is over some text, the cursor changes from arrow
the
>
> > "select" cursor (the vertical thin line).
> >
> > Is a "correct" behavior ? What can I do as a workaround ?
>
> From what you have said, yes it's correct behavior.
> One fix that is commonly used is to disable pointer-events on a
> text element if you don't want it to be selectable.
>
>
>
> ---------------------------------------------------------------------
> 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]
