@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-visualize",
3
- "version": "26.1.2",
3
+ "version": "26.2.0",
4
4
  "description": "JavaScript library for rendering CAD and BIM files in a browser using VisualizeJS",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -29,10 +29,10 @@
29
29
  "docs": "typedoc"
30
30
  },
31
31
  "dependencies": {
32
- "@inweb/client": "~26.1.2",
33
- "@inweb/eventemitter2": "~26.1.2",
34
- "@inweb/markup": "~26.1.2",
35
- "@inweb/viewer-core": "~26.1.2"
32
+ "@inweb/client": "~26.2.0",
33
+ "@inweb/eventemitter2": "~26.2.0",
34
+ "@inweb/markup": "~26.2.0",
35
+ "@inweb/viewer-core": "~26.2.0"
36
36
  },
37
37
  "visualizeJS": "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/master/Visualize.js"
38
38
  }
@@ -55,8 +55,8 @@ export class OdZoomDragger extends OdBaseDragger {
55
55
  this.prevY = y;
56
56
 
57
57
  if (this.press && Math.abs(dltY) >= 10e-6) {
58
- const ZOOM_SPEED = 0.025;
59
- const zoomFactor = dltY > 0 ? 1 + ZOOM_SPEED : 1 - ZOOM_SPEED;
58
+ const ZOOM_SPEED = 0.975;
59
+ const zoomFactor = dltY > 0 ? 1 / ZOOM_SPEED : ZOOM_SPEED;
60
60
  this._zoomAction.action(this.pressX, this.pressY, zoomFactor, this.absoluteX, this.absoluteY);
61
61
  }
62
62
  }
@@ -52,12 +52,12 @@ export class OdZoomWheelDragger extends OdBaseDragger {
52
52
  event = event || window.event;
53
53
  event.preventDefault();
54
54
 
55
- const zoomReverse = this.subject.options.reverseZoomWheel ? -1 : 1;
56
- const zoomSpeed = 0.075 * zoomReverse;
55
+ const zoomIn = this.subject.options.reverseZoomWheel ? 0.925 : 1 / 0.925;
56
+ const zoomOut = this.subject.options.reverseZoomWheel ? 1 / 0.925 : 0.925;
57
57
 
58
58
  const viewer = this.getViewer();
59
59
  if (viewer) {
60
- const zoomFactor = event.deltaY > 0 ? 1 + zoomSpeed : 1 - zoomSpeed;
60
+ const zoomFactor = event.deltaY > 0 ? zoomIn : zoomOut;
61
61
 
62
62
  this._zoomAction.action(
63
63
  event.offsetX * window.devicePixelRatio,