Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/react-virtualized/dist/commonjs/WindowScroller/utils/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getDimensions = getDimensions;
exports.getPositionOffset = getPositionOffset;
exports.getScrollOffset = getScrollOffset;
/**
* Gets the dimensions of the element, accounting for API differences between
* `window` and other DOM elements.
*/
// TODO Move this into WindowScroller and import from there
var isWindow = function isWindow(element) {
return element === window;
};
var getBoundingBox = function getBoundingBox(element) {
return element.getBoundingClientRect();
};
function getDimensions(scrollElement, props) {
if (!scrollElement) {
return {
height: props.serverHeight,
width: props.serverWidth
};
} else if (isWindow(scrollElement)) {
var _window = window,
innerHeight = _window.innerHeight,
innerWidth = _window.innerWidth;
return {
height: typeof innerHeight === 'number' ? innerHeight : 0,
width: typeof innerWidth === 'number' ? innerWidth : 0
};
} else {
return getBoundingBox(scrollElement);
}
}
/**
* Gets the vertical and horizontal position of an element within its scroll container.
* Elements that have been “scrolled past” return negative values.
* Handles edge-case where a user is navigating back (history) from an already-scrolled page.
* In this case the body’s top or left position will be a negative number and this element’s top or left will be increased (by that amount).
*/
function getPositionOffset(element, container) {
if (isWindow(container) && document.documentElement) {
var containerElement = document.documentElement;
var elementRect = getBoundingBox(element);
var containerRect = getBoundingBox(containerElement);
return {
top: elementRect.top - containerRect.top,
left: elementRect.left - containerRect.left
};
} else {
var scrollOffset = getScrollOffset(container);
var _elementRect = getBoundingBox(element);
var _containerRect = getBoundingBox(container);
return {
top: _elementRect.top + scrollOffset.top - _containerRect.top,
left: _elementRect.left + scrollOffset.left - _containerRect.left
};
}
}
/**
* Gets the vertical and horizontal scroll amount of the element, accounting for IE compatibility
* and API differences between `window` and other DOM elements.
*/
function getScrollOffset(element) {
if (isWindow(element) && document.documentElement) {
return {
top: 'scrollY' in window ? window.scrollY : document.documentElement.scrollTop,
left: 'scrollX' in window ? window.scrollX : document.documentElement.scrollLeft
};
} else {
return {
top: element.scrollTop,
left: element.scrollLeft
};
}
} |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]-- |