()
| 4782 | } |
| 4783 | |
| 4784 | function getYOffset() { |
| 4785 | |
| 4786 | var offset = scroll.yOffset; |
| 4787 | |
| 4788 | if (isFunction(offset)) { |
| 4789 | offset = offset(); |
| 4790 | } else if (isElement(offset)) { |
| 4791 | var elem = offset[0]; |
| 4792 | var style = $window.getComputedStyle(elem); |
| 4793 | if (style.position !== 'fixed') { |
| 4794 | offset = 0; |
| 4795 | } else { |
| 4796 | offset = elem.getBoundingClientRect().bottom; |
| 4797 | } |
| 4798 | } else if (!isNumber(offset)) { |
| 4799 | offset = 0; |
| 4800 | } |
| 4801 | |
| 4802 | return offset; |
| 4803 | } |
| 4804 | |
| 4805 | function scrollTo(elem) { |
| 4806 | if (elem) { |
no test coverage detected