MCPcopy
hub / github.com/angular-ui/ui-router / getYOffset

Function getYOffset

test/angular/1.3/angular.js:4429–4448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

scrollToFunction · 0.70

Calls 3

isFunctionFunction · 0.70
isElementFunction · 0.70
isNumberFunction · 0.70

Tested by

no test coverage detected