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.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;