react-zoom-pan-pinch 3.0.6 → 3.0.7
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
CHANGED
|
@@ -752,7 +752,7 @@ var handleCalculateButtonZoom = function (contextInstance, delta, step) {
|
|
|
752
752
|
if (!wrapperComponent) {
|
|
753
753
|
throw new Error("Wrapper is not mounted");
|
|
754
754
|
}
|
|
755
|
-
var targetScale = scale
|
|
755
|
+
var targetScale = scale + delta * step;
|
|
756
756
|
var newScale = checkZoomBounds(roundNumber(targetScale, 3), minScale, maxScale, size, false);
|
|
757
757
|
return newScale;
|
|
758
758
|
};
|
|
@@ -1055,7 +1055,7 @@ var handleCalculateWheelZoom = function (contextInstance, delta, step, disable,
|
|
|
1055
1055
|
if (!wrapperComponent) {
|
|
1056
1056
|
throw new Error("Wrapper is not mounted");
|
|
1057
1057
|
}
|
|
1058
|
-
var targetScale = scale + delta *
|
|
1058
|
+
var targetScale = scale + delta * step;
|
|
1059
1059
|
if (getTarget)
|
|
1060
1060
|
return targetScale;
|
|
1061
1061
|
var paddingEnabled = disable ? false : !disabled;
|