|
From: <pl...@pi...> - 2008-12-25 11:09:25
|
Ethan A Merritt wrote: > In pretty much all cases that I generate SVG plots, it is for display on > dynamically generated pages that contain multiple plots. Again I don't > know that much about it, but it would seem to me that you would need a > single copy of the script that serves the entire page, and mousing into > the box of any individual plot just triggers a new mouse_coord->plot_coord > transformation matrix. I don't know if you can have multiple copies of > the same script on the same page, separated by the scope of the > <svg> tags. But maybe you can. > Hi, I'll split this subject from the original thread to distinguish discussions of coordinate display from Bill's line ToggleVisibility proposal. I had a closer look at mouse events and coordinates. As I originally suspected it gets rapidly bogged down in viewer incompatibilities, mainly the badly non-standard Abobe plugin for IE. (I just love broken closed source software!). Even if restricted to reasonably well written viewers like Opera and Firefox3 it is a non trivial exercise that involves quite a bit of javascript to take account of viewports, scrolling etc., and finally the accuracy of the output is compromised by the integer resolution of mouse event coordinates. There may be a workaround for this latter problem by defining the svg larger and then zooming down (??). Much of the basics can be sourced from these sites though further work will be needed , the tooltip example produces some anomalies and ViewBox.js comments note some limitations. http://www.carto.net/papers/svg/gui/tooltips/ http://www.carto.net/papers/svg/resources/mapApp.js http://www.kevlindev.com/gui/utilities/viewbox/ViewBox.js regards, Peter. |