Gold Martin wrote:

I have a SVG file with ECMA script to show text when the mouse is over areas
(there are some thousand areas to show the name of the area).
How can I switch off/on mouse over effects with the Batik Java classes.
My problem is that the mouse over effects sometimes annoy.
So I want that the user can switch scripting on and off in our SVG browser.
Can I do this with the 'pointer-events' property? I want to set it for the
whole group of areas - not for every <text> tag

If you set 'pointer-events' on the group it will inherit down the tree, unless another element set's pointer-events as well.

When I worked with the browser I found 2 exceptions:

1.) I have implemented the JSVGScrollPane (version 1.4). Fine thing and very
fast.
But when I load an SVG document without the viewbox attribute and I change
the transformation (e.g. zoom), I get a NullPointerException and it is not
any longer possible to change the transformation in the canvas:

Well the scroll pane requires a viewbox otherwise it doesn't know what it should scroll over. I suppose I could modify it so no viewbox just means that the scrollbars never show up.

java.lang.NullPointerException
        at
org.apache.batik.swing.JSVGScrollPane.checkAndSetViewBoxRect(Unknown Source)

2.) When I zoom in the JSVGCanvas with a zoom factor more than 1000 or 1500
(OK it's not usual) I get the following exception:
sun.dc.pr.PRException: endPath: bad path
        at sun.dc.pr.Rasterizer.endPath(Rasterizer.java:537)

This is a longstanding 'bug' in Java2D I suppose we could 'clamp' zooming but when/if this happens really depends on the path data so it would be hard for us to do this well.



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



Reply via email to