()
| 4662 | } |
| 4663 | |
| 4664 | function getYOffset() { |
| 4665 | |
| 4666 | var offset = scroll.yOffset; |
| 4667 | |
| 4668 | if (isFunction(offset)) { |
| 4669 | offset = offset(); |
| 4670 | } else if (isElement(offset)) { |
| 4671 | var elem = offset[0]; |
| 4672 | var style = $window.getComputedStyle(elem); |
| 4673 | if (style.position !== 'fixed') { |
| 4674 | offset = 0; |
| 4675 | } else { |
| 4676 | offset = elem.getBoundingClientRect().bottom; |
| 4677 | } |
| 4678 | } else if (!isNumber(offset)) { |
| 4679 | offset = 0; |
| 4680 | } |
| 4681 | |
| 4682 | return offset; |
| 4683 | } |
| 4684 | |
| 4685 | function scrollTo(elem) { |
| 4686 | if (elem) { |
no test coverage detected