MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / getYOffset

Function getYOffset

code/songhop/www/lib/angular/angular.js:4379–4398  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4377 }
4378
4379 function getYOffset() {
4380
4381 var offset = scroll.yOffset;
4382
4383 if (isFunction(offset)) {
4384 offset = offset();
4385 } else if (isElement(offset)) {
4386 var elem = offset[0];
4387 var style = $window.getComputedStyle(elem);
4388 if (style.position !== 'fixed') {
4389 offset = 0;
4390 } else {
4391 offset = elem.getBoundingClientRect().bottom;
4392 }
4393 } else if (!isNumber(offset)) {
4394 offset = 0;
4395 }
4396
4397 return offset;
4398 }
4399
4400 function scrollTo(elem) {
4401 if (elem) {

Callers 1

scrollToFunction · 0.70

Calls 3

isFunctionFunction · 0.70
isElementFunction · 0.70
isNumberFunction · 0.70

Tested by

no test coverage detected