dashboardjavacloudcoapiotiot-analyticsiot-platformiot-solutionskafkalwm2mmicroservicesmiddlewaremqttnettyplatformsnmpthingsboardvisualizationwebsocketswidgets
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
653 B
27 lines
653 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
/**
|
|
* Returns a number of pixels from the top of the screen for given dom element.
|
|
*
|
|
* @param {object} dom element
|
|
* @returns {number} A position from the top of the screen in pixels
|
|
*/
|
|
var getOffsetTop = exports.getOffsetTop = function getOffsetTop(elem) {
|
|
var yPos = elem.offsetTop;
|
|
var tempEl = elem.offsetParent;
|
|
|
|
while (tempEl != null) {
|
|
yPos += tempEl.offsetTop;
|
|
tempEl = tempEl.offsetParent;
|
|
}
|
|
|
|
return yPos;
|
|
};
|
|
|
|
var isIOS = exports.isIOS = function isIOS() {
|
|
return (/iPad|iPhone|iPod/.test(window.navigator.userAgent) && !window.MSStream
|
|
);
|
|
};
|