SVG coordinates

G

google

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top