Re: Coordinates in SVG that embedded with scrolling

Svami Dhyan Nataraj <[email protected]> Sun, 6 Dec 2009 11:00:42 +0300
Newsgroups gmane.comp.mozilla.devel.svg
Message-ID <[email protected]>
On Sat, 5 Dec 2009 18:08:09 +0300
Svami Dhyan Nataraj <[email protected]> wrote:

> 
> 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?

Oups, list engine have deleted attached svg file...
these files can be found here:

http://lj.shaplov.ru/2009/svg/problem.svg
http://lj.shaplov.ru/2009/svg/problem.html