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

Function getYOffset

test/angular/1.4/angular.js:4784–4803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4782 }
4783
4784 function getYOffset() {
4785
4786 var offset = scroll.yOffset;
4787
4788 if (isFunction(offset)) {
4789 offset = offset();
4790 } else if (isElement(offset)) {
4791 var elem = offset[0];
4792 var style = $window.getComputedStyle(elem);
4793 if (style.position !== 'fixed') {
4794 offset = 0;
4795 } else {
4796 offset = elem.getBoundingClientRect().bottom;
4797 }
4798 } else if (!isNumber(offset)) {
4799 offset = 0;
4800 }
4801
4802 return offset;
4803 }
4804
4805 function scrollTo(elem) {
4806 if (elem) {

Callers 1

scrollToFunction · 0.70

Calls 3

isFunctionFunction · 0.70
isElementFunction · 0.70
isNumberFunction · 0.70

Tested by

no test coverage detected