Comparing version 5.6.1 to 5.6.2
@@ -241,2 +241,15 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
}, [currentPreviewIndex, previewGroupCount, previewUrlsKeys, setCurrent, showLeftOrRightSwitches, visible]); | ||
var onDoubleClick = function onDoubleClick() { | ||
if (visible) { | ||
if (scale !== 1) { | ||
setScale(1); | ||
} | ||
if (position.x !== initialPosition.x || position.y !== initialPosition.y) { | ||
setPosition(initialPosition); | ||
} | ||
} | ||
}; | ||
useEffect(function () { | ||
@@ -321,2 +334,3 @@ var wheelDirection = lastWheelZoomDirection.wheelDirection; | ||
onMouseDown: onMouseDown, | ||
onDoubleClick: onDoubleClick, | ||
ref: imgRef, | ||
@@ -323,0 +337,0 @@ className: "".concat(prefixCls, "-img"), |
@@ -265,2 +265,15 @@ "use strict"; | ||
}, [currentPreviewIndex, previewGroupCount, previewUrlsKeys, setCurrent, showLeftOrRightSwitches, visible]); | ||
var onDoubleClick = function onDoubleClick() { | ||
if (visible) { | ||
if (scale !== 1) { | ||
setScale(1); | ||
} | ||
if (position.x !== initialPosition.x || position.y !== initialPosition.y) { | ||
setPosition(initialPosition); | ||
} | ||
} | ||
}; | ||
useEffect(function () { | ||
@@ -345,2 +358,3 @@ var wheelDirection = lastWheelZoomDirection.wheelDirection; | ||
onMouseDown: onMouseDown, | ||
onDoubleClick: onDoubleClick, | ||
ref: imgRef, | ||
@@ -347,0 +361,0 @@ className: "".concat(prefixCls, "-img"), |
{ | ||
"name": "rc-image", | ||
"version": "5.6.1", | ||
"version": "5.6.2", | ||
"description": "React easy to use image component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84383
2069