()
| 4690 | } |
| 4691 | |
| 4692 | function getYOffset() { |
| 4693 | |
| 4694 | var offset = scroll.yOffset; |
| 4695 | |
| 4696 | if (isFunction(offset)) { |
| 4697 | offset = offset(); |
| 4698 | } else if (isElement(offset)) { |
| 4699 | var elem = offset[0]; |
| 4700 | var style = $window.getComputedStyle(elem); |
| 4701 | if (style.position !== 'fixed') { |
| 4702 | offset = 0; |
| 4703 | } else { |
| 4704 | offset = elem.getBoundingClientRect().bottom; |
| 4705 | } |
| 4706 | } else if (!isNumber(offset)) { |
| 4707 | offset = 0; |
| 4708 | } |
| 4709 | |
| 4710 | return offset; |
| 4711 | } |
| 4712 | |
| 4713 | function scrollTo(elem) { |
| 4714 | if (elem) { |
no test coverage detected