@inweb/viewer-visualize 26.10.0 → 26.10.2

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.
@@ -236,6 +236,7 @@
236
236
  enableGestures: true,
237
237
  geometryType: "vsfx",
238
238
  rulerUnit: "Default",
239
+ cameraMode: "perspective",
239
240
  };
240
241
  }
241
242
  class Options {
@@ -491,6 +492,13 @@
491
492
  this._data.rulerUnit = value;
492
493
  this.change();
493
494
  }
495
+ get cameraMode() {
496
+ return this._data.cameraMode || "perspective";
497
+ }
498
+ set cameraMode(value) {
499
+ this._data.cameraMode = value;
500
+ this.change();
501
+ }
494
502
  }
495
503
  const CanvasEvents = [
496
504
  "click",
@@ -1425,8 +1433,8 @@
1425
1433
  else {
1426
1434
  move = Vector3d.createFromArray([0, currentDelta, 0]);
1427
1435
  }
1428
- let newPos = pos.add(move);
1429
- let newTarget = target.add(move);
1436
+ const newPos = pos.add(move);
1437
+ const newTarget = target.add(move);
1430
1438
  camera.setupCamera(newPos.toArray(), newTarget.toArray(), up.toArray());
1431
1439
  }
1432
1440
  moveBackward(currentDelta) {
@@ -2647,6 +2655,7 @@
2647
2655
  function resetView(viewer) {
2648
2656
  if (!viewer.visualizeJs)
2649
2657
  return;
2658
+ const reset = viewer.getComponent("ResetComponent");
2650
2659
  viewer.executeCommand("setActiveDragger");
2651
2660
  viewer.executeCommand("clearSlices");
2652
2661
  viewer.executeCommand("clearOverlay");
@@ -2655,7 +2664,7 @@
2655
2664
  viewer.executeCommand("showAll");
2656
2665
  viewer.executeCommand("explode", 0);
2657
2666
  viewer.executeCommand("zoomToExtents", true);
2658
- viewer.executeCommand("k3DViewSW");
2667
+ reset.resetCameraPosition();
2659
2668
  viewer.emit({ type: "resetview" });
2660
2669
  }
2661
2670