Monday, April 30, 2012

Re: How to find that an element is now in view on the screen

There is no built in browser mechanism to achieve this, however you can look at the offsets of the target element and its containing element and deduce it yourself.


Also, note that the getClientRects() DOM method can also give you the bounding box information. Still, you'll need to do the math yourself to see if the element is visible or not.


If you want to have something always visible however, why have it in a scroll panel? Why not just place in an absolute position so that it does not scroll?


Sincerely,
Joseph

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/cQEPySfbniIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment