()
| 4427 | } |
| 4428 | |
| 4429 | function getYOffset() { |
| 4430 | |
| 4431 | var offset = scroll.yOffset; |
| 4432 | |
| 4433 | if (isFunction(offset)) { |
| 4434 | offset = offset(); |
| 4435 | } else if (isElement(offset)) { |
| 4436 | var elem = offset[0]; |
| 4437 | var style = $window.getComputedStyle(elem); |
| 4438 | if (style.position !== 'fixed') { |
| 4439 | offset = 0; |
| 4440 | } else { |
| 4441 | offset = elem.getBoundingClientRect().bottom; |
| 4442 | } |
| 4443 | } else if (!isNumber(offset)) { |
| 4444 | offset = 0; |
| 4445 | } |
| 4446 | |
| 4447 | return offset; |
| 4448 | } |
| 4449 | |
| 4450 | function scrollTo(elem) { |
| 4451 | if (elem) { |
no test coverage detected