G
Hello,
Using ECMA script within an SVG document i'm looking for
a way to display an overlay window (rectangle) that follows
the mouse cursor an shows some information.
It boils down to getting the coordinates of the mouse
cursor in the SVG document. While evt.clientX/Y will give
you the pixel coordinates relative to the topleft of the SVG
document, it does not, however, has the same scale or position
of that document's coordinates.
In short; evt.clientX/Y (and evt.screenX/Y) give pixel coordinates,
not document coordinates, and to have a rectangle follow the mouse i
need to draw it in document coordinates.
Any help?
(Using Adobe SVG viewer 3.0 and latest IE)
Using ECMA script within an SVG document i'm looking for
a way to display an overlay window (rectangle) that follows
the mouse cursor an shows some information.
It boils down to getting the coordinates of the mouse
cursor in the SVG document. While evt.clientX/Y will give
you the pixel coordinates relative to the topleft of the SVG
document, it does not, however, has the same scale or position
of that document's coordinates.
In short; evt.clientX/Y (and evt.screenX/Y) give pixel coordinates,
not document coordinates, and to have a rectangle follow the mouse i
need to draw it in document coordinates.
Any help?
(Using Adobe SVG viewer 3.0 and latest IE)