@bifrostui/utils 1.4.2-beta.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.scrollX >= 0 && window.scrollX || document.documentElement.scrollLeft;
80
+ const scrollLeft = window.screenX >= 0 && window.screenX || document.documentElement.scrollLeft;
81
81
  const styles = {};
82
82
  const {
83
83
  width: cWidth,
@@ -161,8 +161,6 @@ 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`;
166
164
  return styles;
167
165
  };
168
166
  const getStylesAndLocation = ({
@@ -1,3 +1,3 @@
1
1
  import type { TaroElement } from '@tarojs/runtime';
2
- declare const getRootElement: (rootEle?: TaroElement | (() => TaroElement)) => HTMLElement | TaroElement;
2
+ declare const getRootElement: (rootEle?: TaroElement | (() => TaroElement)) => TaroElement | HTMLElement;
3
3
  export default getRootElement;
@@ -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.scrollX >= 0 && window.scrollX || document.documentElement.scrollLeft;
55
+ const scrollLeft = window.screenX >= 0 && window.screenX || document.documentElement.scrollLeft;
56
56
  const styles = {};
57
57
  const {
58
58
  width: cWidth,
@@ -136,8 +136,6 @@ 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`;
141
139
  return styles;
142
140
  };
143
141
  const getStylesAndLocation = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bifrostui/utils",
3
- "version": "1.4.2-beta.0",
3
+ "version": "1.4.2",
4
4
  "description": "BUI React utilities for building components.",
5
5
  "main": "dist/index.js",
6
6
  "module": "es/index.js",