()
| 5362 | } |
| 5363 | |
| 5364 | function getYOffset() { |
| 5365 | |
| 5366 | var offset = scroll.yOffset; |
| 5367 | |
| 5368 | if (isFunction(offset)) { |
| 5369 | offset = offset(); |
| 5370 | } else if (isElement(offset)) { |
| 5371 | var elem = offset[0]; |
| 5372 | var style = $window.getComputedStyle(elem); |
| 5373 | if (style.position !== 'fixed') { |
| 5374 | offset = 0; |
| 5375 | } else { |
| 5376 | offset = elem.getBoundingClientRect().bottom; |
| 5377 | } |
| 5378 | } else if (!isNumber(offset)) { |
| 5379 | offset = 0; |
| 5380 | } |
| 5381 | |
| 5382 | return offset; |
| 5383 | } |
| 5384 | |
| 5385 | function scrollTo(elem) { |
| 5386 | if (elem) { |
no test coverage detected