()
| 4990 | } |
| 4991 | |
| 4992 | function getYOffset() { |
| 4993 | |
| 4994 | var offset = scroll.yOffset; |
| 4995 | |
| 4996 | if (isFunction(offset)) { |
| 4997 | offset = offset(); |
| 4998 | } else if (isElement(offset)) { |
| 4999 | var elem = offset[0]; |
| 5000 | var style = $window.getComputedStyle(elem); |
| 5001 | if (style.position !== 'fixed') { |
| 5002 | offset = 0; |
| 5003 | } else { |
| 5004 | offset = elem.getBoundingClientRect().bottom; |
| 5005 | } |
| 5006 | } else if (!isNumber(offset)) { |
| 5007 | offset = 0; |
| 5008 | } |
| 5009 | |
| 5010 | return offset; |
| 5011 | } |
| 5012 | |
| 5013 | function scrollTo(elem) { |
| 5014 | if (elem) { |
no test coverage detected