MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / getYOffset

Function getYOffset

lib/test/angular/1.4.3/angular.js:4664–4683  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4662 }
4663
4664 function getYOffset() {
4665
4666 var offset = scroll.yOffset;
4667
4668 if (isFunction(offset)) {
4669 offset = offset();
4670 } else if (isElement(offset)) {
4671 var elem = offset[0];
4672 var style = $window.getComputedStyle(elem);
4673 if (style.position !== 'fixed') {
4674 offset = 0;
4675 } else {
4676 offset = elem.getBoundingClientRect().bottom;
4677 }
4678 } else if (!isNumber(offset)) {
4679 offset = 0;
4680 }
4681
4682 return offset;
4683 }
4684
4685 function scrollTo(elem) {
4686 if (elem) {

Callers 1

scrollToFunction · 0.70

Calls 3

isFunctionFunction · 0.70
isElementFunction · 0.70
isNumberFunction · 0.70

Tested by

no test coverage detected