@sheinx/hooks 3.3.3-beta.8 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
package/cjs/utils/dom/element.js
CHANGED
@@ -82,7 +82,7 @@ var addResizeObserver = exports.addResizeObserver = function addResizeObserver(e
|
|
82
82
|
if (height && lastHeight !== height) {
|
83
83
|
debounceHandler(entry);
|
84
84
|
}
|
85
|
-
} else if (width
|
85
|
+
} else if (lastWidth !== width || lastHeight !== height) {
|
86
86
|
debounceHandler(entry, {
|
87
87
|
x: lastWidth !== width,
|
88
88
|
y: lastHeight !== height
|
package/esm/utils/dom/element.js
CHANGED
@@ -72,7 +72,7 @@ export var addResizeObserver = function addResizeObserver(el, handler) {
|
|
72
72
|
if (height && lastHeight !== height) {
|
73
73
|
debounceHandler(entry);
|
74
74
|
}
|
75
|
-
} else if (width
|
75
|
+
} else if (lastWidth !== width || lastHeight !== height) {
|
76
76
|
debounceHandler(entry, {
|
77
77
|
x: lastWidth !== width,
|
78
78
|
y: lastHeight !== height
|