I've found the time to write a test case for this.  I've attached the source.  
In short, a document must be reassociated with the JSVGCanvas (via 
setDocument(...)) before tooltips for <text> elements show up.
 
Michael Bishop

________________________________

From: Bishop, Michael W. CONTR J9C880 [mailto:[EMAIL PROTECTED]
Sent: Fri 4/13/2007 2:54 PM
To: [EMAIL PROTECTED]
Subject: RE: Tooltips in <text> elements?


More information on this issue; if I save the SVG to a file, then load it back 
to the JSVGCanvas, it seems to work.  I'll see if I can't draw up a test case 
to see if there's a possible bug with assigning tooltips to <text> elements in 
in-memory documents?
 
Michael Bishop

________________________________

From: Bishop, Michael W. CONTR J9C880 [mailto:[EMAIL PROTECTED]
Sent: Fri 4/13/2007 11:23 AM
To: [EMAIL PROTECTED]
Subject: RE: Tooltips in <text> elements?


Hi Thomas,
 
You're right, it does work in Squiggle.  I made another SVG with all my 
possible elements; rect, ellipse, polygon, line, path, polyline, image, and 
text.  In my JSVGCanvas, text is the ONLY one that does not work.  I don't 
know, I initiate my JSVGCanvas with (null, true, false), disabling text 
selection.  I tried enabling text selection, no difference.  I'm not sure why 
it works in Squiggle and not in the canvas.
 
Michael Bishop

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Fri 4/13/2007 6:34 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Tooltips in <text> elements?



Hi Michael,

"Bishop, Michael W. CONTR J9C880" <[EMAIL PROTECTED]> wrote on
04/12/2007 04:04:09 PM:

> I?m trying to add tooltips and they work for most elements.
> Unfortuantely, my primary purpose is for text and I don?t seem to be
> getting the tooltip to display when I hover the mouse over text:

   Your example worked for me in Squiggle...

> <g svgx:name="default_layer" svgx:type="layer"
>        id="SVGWB-723C3643-74A9-995B-FFDF-1DDB033A46B8" style="display:
block"
>        pointer-events="none">
>         <rect x="64" y="157"
>               transform="matrix(1.4128035558031693, 0.0, 0.0, 1.
> 4128035558031693, 0.0, -188.0794677734375)"
>               fill-opacity="1" fill="gray" width="196" height="141"
>               id="SVGWB-2EA378C8-70AF-CDFA-2DA7-B5BF4CA16A02"
stroke="black"
>               stroke-opacity="1" stroke-width="1"
pointer-events="visible">
>             <desc id="SVGWB-AC020D00-4691-13EB-EA48-EF19CD5E4672">
>                 sdfgdsfgfd
>             </desc>
>         </rect>
>         <text fill-opacity="1" stroke="none"
>               id="SVGWB-CA0080D5-EBD8-D14E-B5E7-4283A5238185"
>               style="font-family: sans-serif; font-weight: normal;
> font-style: normal; font-size: 24"
>               svgx:type="text"
>               transform="matrix(1.4128035558031693, 0.0, 0.0, 1.
> 4128035558031693, 0.0, -188.0794677734375)"
>               stroke-opacity="1" fill="black" svgx:lang="en"
stroke-width="1"
>               pointer-events="visible" x="95" y="376">
>             Hello
>             <desc id="SVGWB-2C452FC2-C80C-656F-30D7-A9723DF1FFC0">
>                 Bonjour
>             </desc>
>         </text>
>     </g>
>
> The tooltip for the <rect> element shows properly on a mouse-over on
> the JSVGCanvas.  The tooltip for the <text> element does not.  Any
> reasons why?  Is there a difference between using <desc> and <title>
> for tooltips?
>
> Michael Bishop

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


<<winmail.dat>>

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

Reply via email to