@inweb/viewer-visualize 26.1.3 → 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.
- package/dist/viewer-visualize.js +5 -5
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +5 -5
- package/dist/viewer-visualize.module.js.map +1 -1
- package/package.json +5 -5
- package/src/Viewer/Draggers/OdZoomDragger.ts +2 -2
- package/src/Viewer/Draggers/OdZoomWheelDragger.ts +3 -3
|
@@ -1462,8 +1462,8 @@ class OdZoomDragger extends OdBaseDragger {
|
|
|
1462
1462
|
const dltY = y - this.prevY;
|
|
1463
1463
|
this.prevY = y;
|
|
1464
1464
|
if (this.press && Math.abs(dltY) >= 1e-5) {
|
|
1465
|
-
const ZOOM_SPEED = .
|
|
1466
|
-
const zoomFactor = dltY > 0 ? 1
|
|
1465
|
+
const ZOOM_SPEED = .975;
|
|
1466
|
+
const zoomFactor = dltY > 0 ? 1 / ZOOM_SPEED : ZOOM_SPEED;
|
|
1467
1467
|
this._zoomAction.action(this.pressX, this.pressY, zoomFactor, this.absoluteX, this.absoluteY);
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
@@ -1489,11 +1489,11 @@ class OdZoomWheelDragger extends OdBaseDragger {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
event = event || window.event;
|
|
1491
1491
|
event.preventDefault();
|
|
1492
|
-
const
|
|
1493
|
-
const
|
|
1492
|
+
const zoomIn = this.subject.options.reverseZoomWheel ? .925 : 1 / .925;
|
|
1493
|
+
const zoomOut = this.subject.options.reverseZoomWheel ? 1 / .925 : .925;
|
|
1494
1494
|
const viewer = this.getViewer();
|
|
1495
1495
|
if (viewer) {
|
|
1496
|
-
const zoomFactor = event.deltaY > 0 ?
|
|
1496
|
+
const zoomFactor = event.deltaY > 0 ? zoomIn : zoomOut;
|
|
1497
1497
|
this._zoomAction.action(event.offsetX * window.devicePixelRatio, event.offsetY * window.devicePixelRatio, zoomFactor, event.offsetX, event.offsetY);
|
|
1498
1498
|
if (!this._isEnableInteractivityMode) {
|
|
1499
1499
|
this._isEnableInteractivityMode = true;
|