sirius-common-utils 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sirius-common-utils.js +17 -10
- package/dist/sirius-common-utils.umd.cjs +17 -10
- package/package.json +1 -1
|
@@ -984,16 +984,22 @@ function closetByClassName(elem, classNameList) {
|
|
|
984
984
|
return null;
|
|
985
985
|
}
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
var
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
987
|
+
function offset(domNode) {
|
|
988
|
+
var offest = {
|
|
989
|
+
top: 0,
|
|
990
|
+
left: 0
|
|
991
|
+
};
|
|
992
|
+
if (!domNode.getClientRects().length) {
|
|
993
|
+
return offest;
|
|
994
|
+
}
|
|
995
|
+
if (window.getComputedStyle(domNode)["display"] === "none") {
|
|
996
|
+
return offest;
|
|
997
|
+
}
|
|
998
|
+
offest = domNode.getBoundingClientRect();
|
|
999
|
+
var docElement = domNode.ownerDocument.documentElement;
|
|
994
1000
|
return {
|
|
995
|
-
|
|
996
|
-
|
|
1001
|
+
top: offest.top + (window.scrollY || window.pageYOffset) - docElement.clientTop,
|
|
1002
|
+
left: offest.left + (window.scrollX || window.pageXOffset) - docElement.clientLeft
|
|
997
1003
|
};
|
|
998
1004
|
}
|
|
999
1005
|
const DomUtils = {
|
|
@@ -1001,7 +1007,8 @@ const DomUtils = {
|
|
|
1001
1007
|
forbidBodyScroll,
|
|
1002
1008
|
syncDomAnimation,
|
|
1003
1009
|
closetByClassName,
|
|
1004
|
-
getDomElemMouseRelativePosition
|
|
1010
|
+
getDomElemMouseRelativePosition,
|
|
1011
|
+
offset
|
|
1005
1012
|
};
|
|
1006
1013
|
function isIOS() {
|
|
1007
1014
|
return [
|
|
@@ -985,16 +985,22 @@
|
|
|
985
985
|
return null;
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
function
|
|
989
|
-
var
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
988
|
+
function offset(domNode) {
|
|
989
|
+
var offest = {
|
|
990
|
+
top: 0,
|
|
991
|
+
left: 0
|
|
992
|
+
};
|
|
993
|
+
if (!domNode.getClientRects().length) {
|
|
994
|
+
return offest;
|
|
995
|
+
}
|
|
996
|
+
if (window.getComputedStyle(domNode)["display"] === "none") {
|
|
997
|
+
return offest;
|
|
998
|
+
}
|
|
999
|
+
offest = domNode.getBoundingClientRect();
|
|
1000
|
+
var docElement = domNode.ownerDocument.documentElement;
|
|
995
1001
|
return {
|
|
996
|
-
|
|
997
|
-
|
|
1002
|
+
top: offest.top + (window.scrollY || window.pageYOffset) - docElement.clientTop,
|
|
1003
|
+
left: offest.left + (window.scrollX || window.pageXOffset) - docElement.clientLeft
|
|
998
1004
|
};
|
|
999
1005
|
}
|
|
1000
1006
|
const DomUtils = {
|
|
@@ -1002,7 +1008,8 @@
|
|
|
1002
1008
|
forbidBodyScroll,
|
|
1003
1009
|
syncDomAnimation,
|
|
1004
1010
|
closetByClassName,
|
|
1005
|
-
getDomElemMouseRelativePosition
|
|
1011
|
+
getDomElemMouseRelativePosition,
|
|
1012
|
+
offset
|
|
1006
1013
|
};
|
|
1007
1014
|
function isIOS() {
|
|
1008
1015
|
return [
|