react-zoom-pan-pinch 3.0.5 → 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.esm.js CHANGED
@@ -744,7 +744,7 @@ var handleCalculateButtonZoom = function (contextInstance, delta, step) {
744
744
  if (!wrapperComponent) {
745
745
  throw new Error("Wrapper is not mounted");
746
746
  }
747
- var targetScale = scale * Math.exp(delta * step);
747
+ var targetScale = scale + delta * step;
748
748
  var newScale = checkZoomBounds(roundNumber(targetScale, 3), minScale, maxScale, size, false);
749
749
  return newScale;
750
750
  };
@@ -1047,7 +1047,7 @@ var handleCalculateWheelZoom = function (contextInstance, delta, step, disable,
1047
1047
  if (!wrapperComponent) {
1048
1048
  throw new Error("Wrapper is not mounted");
1049
1049
  }
1050
- var targetScale = scale + delta * (scale - scale * step) * step;
1050
+ var targetScale = scale + delta * step;
1051
1051
  if (getTarget)
1052
1052
  return targetScale;
1053
1053
  var paddingEnabled = disable ? false : !disabled;
@@ -1902,7 +1902,7 @@ var TransformComponent = function (_a) {
1902
1902
  var useTransformContext = function () {
1903
1903
  var libraryContext = useContext(Context);
1904
1904
  if (!libraryContext) {
1905
- throw new Error("Transform context mus be placed inside TransformWrapper");
1905
+ throw new Error("Transform context must be placed inside TransformWrapper");
1906
1906
  }
1907
1907
  return libraryContext;
1908
1908
  };