react-zoom-pan-pinch 3.4.1 → 3.4.3
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/index.cjs.js +5 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +5 -9
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -949,16 +949,9 @@ function makePassiveEventOption() {
|
|
|
949
949
|
}
|
|
950
950
|
|
|
951
951
|
var isExcludedNode = function (node, excluded) {
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
if (isExcludedTag)
|
|
955
|
-
return true;
|
|
956
|
-
var isExcludedClassName = excluded.find(function (className) {
|
|
957
|
-
return node.classList.contains(className);
|
|
952
|
+
return excluded.some(function (exclude) {
|
|
953
|
+
return node.matches("".concat(exclude, ", .").concat(exclude, ", ").concat(exclude, " *, .").concat(exclude, " *"));
|
|
958
954
|
});
|
|
959
|
-
if (isExcludedClassName)
|
|
960
|
-
return true;
|
|
961
|
-
return false;
|
|
962
955
|
};
|
|
963
956
|
var cancelTimeout = function (timeout) {
|
|
964
957
|
if (timeout) {
|
|
@@ -1762,6 +1755,9 @@ var useResize = function (ref, onResize, dependencies) {
|
|
|
1762
1755
|
useLayoutEffect(function () {
|
|
1763
1756
|
var _a;
|
|
1764
1757
|
didUnmount.current = false;
|
|
1758
|
+
if (!("ResizeObserver" in window)) {
|
|
1759
|
+
return;
|
|
1760
|
+
}
|
|
1765
1761
|
if (ref) {
|
|
1766
1762
|
resizeObserverRef.current = new ResizeObserver(function (entries) {
|
|
1767
1763
|
var newSize = ref.getBoundingClientRect();
|