* Checks if a side of an element is scrolled past a side of its parents * @param {HTMLElement} el The element who's side being scrolled out of view is in question * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom') * @param {String
(el, elSide, parentSide)
| 319 | * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element |
| 320 | */ |
| 321 | function isScrolledPast(el, elSide, parentSide) { |
| 322 | var parent = getParentAutoScrollElement(el, true), |
| 323 | elSideVal = getRect(el)[elSide]; |
| 324 | |
| 325 | /* jshint boss:true */ |
| 326 | while (parent) { |
| 327 | var parentSideVal = getRect(parent)[parentSide], |
| 328 | visible = void 0; |
| 329 | if (parentSide === 'top' || parentSide === 'left') { |
| 330 | visible = elSideVal >= parentSideVal; |
| 331 | } else { |
| 332 | visible = elSideVal <= parentSideVal; |
| 333 | } |
| 334 | if (!visible) return parent; |
| 335 | if (parent === getWindowScrollingElement()) break; |
| 336 | parent = getParentAutoScrollElement(parent, false); |
| 337 | } |
| 338 | return false; |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible) |
no test coverage detected
searching dependent graphs…