On Feb 2, 6:54 pm, saurabh hirani <[email protected]> wrote:
> Hi John,
>
> > Just added a new example chart titled "World's Simplest Line Chart
> > Editor" that shows you how to add points to a Client-side GChart curve
> > by clicking on empty space on the chart (you'll need to download the
> > latest v2.4 version of Cllient-side GChart to use this code):
>
> > Code:http://gchart.googlecode.com/svn/trunk/gcharttestapp/src/com/googleco...
> > Screen-shot:http://gchart.googlecode.com/svn/trunk/gchart/src/com/googlecode/gcha...
>
> Thanks a lot for providing such a thorough explanation of how this can
> be done. I really appreciate your putting in time to answer these
> queries. I will download 2.4 and check it out.
>
> Basically, I wanted to do this because I wanted to highlight an area
> of an already drawn chart. In the meantime, while I could not know how
> to do this, I had checked out orkut's photo-tagging feature which
> allows us to draw a rectangle over an already existing image.  While I
> implemented drawing a rectangle over an image using GWT with client
> cordinates, I realized that it fails when my image is larger than my
> browser window. Because as I scroll down or on the side my client
> cordinates with respect to a reference point at the top are lost. As
> in, my image's top left edge whose cordinate was say (20, 100) before
> I scroll is no longer in the frame and (20, 100) becomes the cordinate
> of the point at the top left of the browser window which is not the
> top left edge but a portion of the image which came into picture when
> I scrolled down. I saw that you are using clientX and clientY. So I
> thought maybe this information would be useful.


And due to your example I found the missing piece to my puzzle.
getScrollLeft and getScrollTop - I was searching for methods which
could give me these cordinates to solve the problem as described
above. I was studying your code and I used it in my work of drawing
rectangle using GWT and it worked. Thanks a lot.

- Saurabh

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to