@inweb/viewer-visualize 26.1.2 → 26.2.0

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.
@@ -15770,8 +15770,8 @@
15770
15770
  const dltY = y - this.prevY;
15771
15771
  this.prevY = y;
15772
15772
  if (this.press && Math.abs(dltY) >= 10e-6) {
15773
- const ZOOM_SPEED = 0.025;
15774
- const zoomFactor = dltY > 0 ? 1 + ZOOM_SPEED : 1 - ZOOM_SPEED;
15773
+ const ZOOM_SPEED = 0.975;
15774
+ const zoomFactor = dltY > 0 ? 1 / ZOOM_SPEED : ZOOM_SPEED;
15775
15775
  this._zoomAction.action(this.pressX, this.pressY, zoomFactor, this.absoluteX, this.absoluteY);
15776
15776
  }
15777
15777
  }
@@ -15819,11 +15819,11 @@
15819
15819
  }
15820
15820
  event = event || window.event;
15821
15821
  event.preventDefault();
15822
- const zoomReverse = this.subject.options.reverseZoomWheel ? -1 : 1;
15823
- const zoomSpeed = 0.075 * zoomReverse;
15822
+ const zoomIn = this.subject.options.reverseZoomWheel ? 0.925 : 1 / 0.925;
15823
+ const zoomOut = this.subject.options.reverseZoomWheel ? 1 / 0.925 : 0.925;
15824
15824
  const viewer = this.getViewer();
15825
15825
  if (viewer) {
15826
- const zoomFactor = event.deltaY > 0 ? 1 + zoomSpeed : 1 - zoomSpeed;
15826
+ const zoomFactor = event.deltaY > 0 ? zoomIn : zoomOut;
15827
15827
  this._zoomAction.action(event.offsetX * window.devicePixelRatio, event.offsetY * window.devicePixelRatio, zoomFactor, event.offsetX, event.offsetY);
15828
15828
  if (!this._isEnableInteractivityMode) {
15829
15829
  this._isEnableInteractivityMode = true;