You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Julleofa <ju...@yahoo.com> on 2009/04/01 07:55:08 UTC
Re: text/tspan mouse events change when zoomed in
Hi Helder,
Here is some basic information about my system and software versions:
- Windows XP Professional Version 2002, Service Pack 3
- JDK was originally 6.0_07 but updated it to 6.0_13 and it didn't help.
- Batik 1.7
As you suggested I tried out the nightly build (Mar 19th one) but it didn't
fix this problem. As side note it seems that set element, that I also use in
my SVG, doesn't work in the nightly build.
I made few changes to my code so that is produced as reduced test case as I
could. It demonstrates all the points I made in my first message. I have
tested it with my own program and with Batiks Squiggle.
http://www.nabble.com/file/p22820242/test.svg test.svg
Juha
--
View this message in context: http://www.nabble.com/text-tspan-mouse-events-change-when-zoomed-in-tp22799472p22820242.html
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: text/tspan mouse events change when zoomed in
Posted by Helder Magalhães <he...@gmail.com>.
Hi everyone,
> I'd ask for more feedback for Batik developers in order to check for
> possible issues in the test case itself and/or to confirm if this
> should go to the bug tracker [1].
A fix from Thomas, landed in revision 761228, fixed this issue.
Thanks, Thomas! :-)
Should something be inserted into the relevant change tracker
("CHANGES")? Specially for the "Fix mouse events on tspans." item,
which has no associated bug... ;-)
@Juha
The fix should be available in nightly builds [1] by tomorrow. ;-)
Regards,
Helder
[1] http://arc.mcc.id.au/batik-nightly/
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: text/tspan mouse events change when zoomed in
Posted by Helder Magalhães <he...@gmail.com>.
Hi Juha,
> As you suggested I tried out the nightly build (Mar 19th one) but it didn't
> fix this problem. As side note it seems that set element, that I also use in
> my SVG, doesn't work in the nightly build.
Yes, I can also confirm the symptom using the trunk code (revision
755843) using in Windows XP SP3.
> I made few changes to my code so that is produced as reduced test case as I
> could. It demonstrates all the points I made in my first message. I have
> tested it with my own program and with Batiks Squiggle.
Thanks for the test case: this made it easy to reproduce. ;-)
I've slightly beautified the test case and made minor changes (such as
renaming "changeColor" to "toggleColor" since it's what the method is
doing) and am attaching it to this message. So, in addition to the
'tpan' behavior, I've noticed that it's easy to reproduce two issues
(possibly related and/or the same):
Steps to reproduce:
1. Open attachment in Squiggle;
2. Mouse over and out on "Color test" and "Hidden test";
3. Zoom in;
4. Mouse over and out on "Color test" and "Hidden test";
Expected results:
In step 4, behavior would be the same as in step 2.
Actual results:
In step 4, mouse out events are not consistently triggered. On "Color
test", color is never toggled; On "Hidden test", only the mouse over
event seems to be triggered. If a mouse click is made over the
elements while the document is zoomed, then the events seem to be
triggered more or less as expected, but an NPE is triggered when the
click is made over "Hidden data1" (element which is displayed when
mouse is over "Hidden test"):
java.lang.NullPointerException
at org.apache.batik.gvt.renderer.StrokingTextPainter.hitTest(Unknown
Source)
at org.apache.batik.gvt.renderer.BasicTextPainter.selectAt(Unknown
Source)
at org.apache.batik.gvt.TextNode.selectAt(Unknown Source)
at org.apache.batik.gvt.text.ConcreteTextSelector.checkSelectGesture(Unknown
Source)
at org.apache.batik.gvt.text.ConcreteTextSelector.mousePressed(Unknown
Source)
at org.apache.batik.swing.gvt.TextSelectionManager$MouseListener.mousePressed(Unknown
Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.processMouseEvent(Unknown
Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.dispatchMouseEvent(Unknown
Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.dispatchEvent(Unknown
Source)
at org.apache.batik.gvt.event.AWTEventDispatcher.mousePressed(Unknown
Source)
at org.apache.batik.swing.svg.JSVGComponent$SVGListener$13.run(Unknown
Source)
at org.apache.batik.util.RunnableQueue.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
I'd ask for more feedback for Batik developers in order to check for
possible issues in the test case itself and/or to confirm if this
should go to the bug tracker [1].
@Juha
Unrelated to the report, by further analyzing what's going on, I've
noticed you are relying on adjacent DOM nodes and therefore your code
is not prepared to handle white space nodes (typically used in
properly indented XML). I'd seriously suggest taking a look at DOM 2
node list utilities such as getElementsByTagNameNS [2], in order to
fetch only the intended sets of nodes. ;-)
Best regards,
Helder Magalhães
[1] https://issues.apache.org/bugzilla/buglist.cgi?query_format=specific&bug_status=__open__&product=Batik
[2] http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-getElBTNNS