()
| 5336 | } |
| 5337 | |
| 5338 | function getYOffset() { |
| 5339 | |
| 5340 | var offset = scroll.yOffset; |
| 5341 | |
| 5342 | if (isFunction(offset)) { |
| 5343 | offset = offset(); |
| 5344 | } else if (isElement(offset)) { |
| 5345 | var elem = offset[0]; |
| 5346 | var style = $window.getComputedStyle(elem); |
| 5347 | if (style.position !== 'fixed') { |
| 5348 | offset = 0; |
| 5349 | } else { |
| 5350 | offset = elem.getBoundingClientRect().bottom; |
| 5351 | } |
| 5352 | } else if (!isNumber(offset)) { |
| 5353 | offset = 0; |
| 5354 | } |
| 5355 | |
| 5356 | return offset; |
| 5357 | } |
| 5358 | |
| 5359 | function scrollTo(elem) { |
| 5360 | if (elem) { |
no test coverage detected