Coordinates in SVG that embedded with scrolling

Svami Dhyan Nataraj <[email protected]> Sat, 5 Dec 2009 18:08:09 +0300
Newsgroups gmane.comp.mozilla.devel.svg
Message-ID <[email protected]>
I have problems with getting coordinates of mouse when I embedded SVG
into view port with scrollbars... 

If you try an example from attached file (an html one), you will be able
to drag-n-drop blue circle while you did not scroll view port. But if
you scroll viewport to see green ball, you will not be able to drag it.

clientX and clientY are given as if the image were not scrolled at all,
and the circle immediately moves to the top of the image...

It seems to me that I should add dx and dy of scrollbars, to get real
coordinates. But I do not know where to get them.

Can you please help me with this sample?

_______________________________________________
dev-tech-svg mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-svg
problem.html (text/html, 109 B)
<html>
  <body>
  <embed src='problem.svg' width=150 height=150  style="overflow:scroll;">
  </body>
</html>