@bifrostui/utils 1.4.0 → 1.4.2-beta.0
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.
@@ -77,7 +77,7 @@ const getDirectionLocationStyle = ({
|
|
77
77
|
arrowLocation
|
78
78
|
}) => {
|
79
79
|
const scrollTop = window.scrollY >= 0 && window.scrollY || document.documentElement.scrollTop;
|
80
|
-
const scrollLeft = window.
|
80
|
+
const scrollLeft = window.scrollX >= 0 && window.scrollX || document.documentElement.scrollLeft;
|
81
81
|
const styles = {};
|
82
82
|
const {
|
83
83
|
width: cWidth,
|
@@ -161,6 +161,8 @@ const getDirectionLocationStyle = ({
|
|
161
161
|
if (styles.left) {
|
162
162
|
styles.left = `${styles.left + scrollLeft}px`;
|
163
163
|
}
|
164
|
+
styles.width = `${width}px`;
|
165
|
+
styles.height = `${height}px`;
|
164
166
|
return styles;
|
165
167
|
};
|
166
168
|
const getStylesAndLocation = ({
|
@@ -52,7 +52,7 @@ const getDirectionLocationStyle = ({
|
|
52
52
|
arrowLocation
|
53
53
|
}) => {
|
54
54
|
const scrollTop = window.scrollY >= 0 && window.scrollY || document.documentElement.scrollTop;
|
55
|
-
const scrollLeft = window.
|
55
|
+
const scrollLeft = window.scrollX >= 0 && window.scrollX || document.documentElement.scrollLeft;
|
56
56
|
const styles = {};
|
57
57
|
const {
|
58
58
|
width: cWidth,
|
@@ -136,6 +136,8 @@ const getDirectionLocationStyle = ({
|
|
136
136
|
if (styles.left) {
|
137
137
|
styles.left = `${styles.left + scrollLeft}px`;
|
138
138
|
}
|
139
|
+
styles.width = `${width}px`;
|
140
|
+
styles.height = `${height}px`;
|
139
141
|
return styles;
|
140
142
|
};
|
141
143
|
const getStylesAndLocation = ({
|