MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / getYOffset

Function getYOffset

web/static/bower_components/angular/angular.js:4692–4711  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4690 }
4691
4692 function getYOffset() {
4693
4694 var offset = scroll.yOffset;
4695
4696 if (isFunction(offset)) {
4697 offset = offset();
4698 } else if (isElement(offset)) {
4699 var elem = offset[0];
4700 var style = $window.getComputedStyle(elem);
4701 if (style.position !== 'fixed') {
4702 offset = 0;
4703 } else {
4704 offset = elem.getBoundingClientRect().bottom;
4705 }
4706 } else if (!isNumber(offset)) {
4707 offset = 0;
4708 }
4709
4710 return offset;
4711 }
4712
4713 function scrollTo(elem) {
4714 if (elem) {

Callers 1

scrollToFunction · 0.85

Calls 3

isFunctionFunction · 0.85
isElementFunction · 0.85
isNumberFunction · 0.85

Tested by

no test coverage detected