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

Function getYOffset

test/angular/1.7/angular.js:5364–5383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5362 }
5363
5364 function getYOffset() {
5365
5366 var offset = scroll.yOffset;
5367
5368 if (isFunction(offset)) {
5369 offset = offset();
5370 } else if (isElement(offset)) {
5371 var elem = offset[0];
5372 var style = $window.getComputedStyle(elem);
5373 if (style.position !== 'fixed') {
5374 offset = 0;
5375 } else {
5376 offset = elem.getBoundingClientRect().bottom;
5377 }
5378 } else if (!isNumber(offset)) {
5379 offset = 0;
5380 }
5381
5382 return offset;
5383 }
5384
5385 function scrollTo(elem) {
5386 if (elem) {

Callers 1

scrollToFunction · 0.70

Calls 3

isFunctionFunction · 0.70
isElementFunction · 0.70
isNumberFunction · 0.70

Tested by

no test coverage detected