()
| 5427 | } |
| 5428 | |
| 5429 | function getYOffset() { |
| 5430 | |
| 5431 | var offset = scroll.yOffset; |
| 5432 | |
| 5433 | if (isFunction(offset)) { |
| 5434 | offset = offset(); |
| 5435 | } else if (isElement(offset)) { |
| 5436 | var elem = offset[0]; |
| 5437 | var style = $window.getComputedStyle(elem); |
| 5438 | if (style.position !== 'fixed') { |
| 5439 | offset = 0; |
| 5440 | } else { |
| 5441 | offset = elem.getBoundingClientRect().bottom; |
| 5442 | } |
| 5443 | } else if (!isNumber(offset)) { |
| 5444 | offset = 0; |
| 5445 | } |
| 5446 | |
| 5447 | return offset; |
| 5448 | } |
| 5449 | |
| 5450 | function scrollTo(elem) { |
| 5451 | if (elem) { |
no test coverage detected