MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / getYOffset

Function getYOffset

OpenReservation/wwwroot/Scripts/angular.js:4837–4855  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4835 }
4836
4837 function getYOffset() {
4838 var offset = scroll.yOffset;
4839
4840 if (isFunction(offset)) {
4841 offset = offset();
4842 } else if (isElement(offset)) {
4843 var elem = offset[0];
4844 var style = $window.getComputedStyle(elem);
4845 if (style.position !== 'fixed') {
4846 offset = 0;
4847 } else {
4848 offset = elem.getBoundingClientRect().bottom;
4849 }
4850 } else if (!isNumber(offset)) {
4851 offset = 0;
4852 }
4853
4854 return offset;
4855 }
4856
4857 function scrollTo(elem) {
4858 if (elem) {

Callers 1

scrollToFunction · 0.85

Calls 3

isFunctionFunction · 0.85
isElementFunction · 0.85
isNumberFunction · 0.85

Tested by

no test coverage detected