Hi,

I have what should be a simple problem, but is baffling me.I have a page 
where the display is created by ng-repeat. It is essentially a table (using 
DIVs) and each record is twso rows. The top row of each record has two 
buttons that when clicked show a related div filled with data. The problem 
is when there is a div is at the bottom of the viewport and the button is 
clicked, the hidden div appears and is MOSTLY off the screen. A scrollbar 
appears in the browser. I have used the JQuery scrollTo feature and it 
brings the div contents into view, but it even scrolls things that are 
already in view as well. What I have discovered is that the function that 
tests for visibility uses bounds.top and bounds.bottom and bounds.left and 
bounds.right to determine if the item is visible. Every single DIV has the 
same values for bounds.top. This is causing me an issue because what I want 
to do is:

1. Have the button click happen.
2. Reveal the hidden div.
3. Determine if the newly revealed div is visible in the viewport
4. If yes, do nothing. If no, scroll it into view.

How can I possibly do this when every single div is showing as the same 
position on the screen? (which is the REAL location of the first div 
created with ng-repeat).

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to