@inweb/viewer-visualize 25.6.4 → 25.6.6

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.
@@ -649,6 +649,7 @@ function zoomToExtents(viewer, force = false, animate = viewer.options.cameraAni
649
649
  visViewer.zoomExtents(force);
650
650
  visViewer.update();
651
651
  visViewer.setEnableAnimation(saveEnableAmination);
652
+ viewer.deviceAutoRegeneration();
652
653
  viewer.update();
653
654
  viewer.emitEvent({
654
655
  type: "zoom"
@@ -670,6 +671,7 @@ function zoomToObjects(viewer, handles = []) {
670
671
  if (!entityId.isNull()) selectionSet.appendEntity(entityId);
671
672
  }));
672
673
  (_a = visViewer.zoomToObjects) === null || _a === void 0 ? void 0 : _a.call(visViewer, selectionSet);
674
+ viewer.deviceAutoRegeneration();
673
675
  viewer.update();
674
676
  viewer.emitEvent({
675
677
  type: "zoom"
@@ -685,6 +687,7 @@ function zoomToSelected(viewer) {
685
687
  const visViewer = viewer.visViewer();
686
688
  const selectionSet = visViewer.getSelected();
687
689
  (_a = visViewer.zoomToObjects) === null || _a === void 0 ? void 0 : _a.call(visViewer, selectionSet);
690
+ viewer.deviceAutoRegeneration();
688
691
  viewer.update();
689
692
  viewer.emitEvent({
690
693
  type: "zoom"
@@ -2050,6 +2053,7 @@ class ZoomAction {
2050
2053
  var _a;
2051
2054
  const viewer = this._m_module.getViewer();
2052
2055
  viewer.zoomAt(zoomFactor, x, y);
2056
+ this._subject.deviceAutoRegeneration();
2053
2057
  (_a = this._subject.activeDragger()) === null || _a === void 0 ? void 0 : _a.updatePreview();
2054
2058
  this._subject.emitEvent({
2055
2059
  type: "zoomat",
@@ -5894,6 +5898,15 @@ class Viewer extends EventEmitter2 {
5894
5898
  executeCommand(id, ...args) {
5895
5899
  return commands("VisualizeJS").executeCommand(id, this, ...args);
5896
5900
  }
5901
+ deviceAutoRegeneration() {
5902
+ const visViewer = this.visViewer();
5903
+ const device = visViewer.getActiveDevice();
5904
+ const coef = device.getOptionDouble(this.visLib().DeviceOptions.kRegenCoef);
5905
+ if (coef > 1) {
5906
+ visViewer.regenAll();
5907
+ this.update();
5908
+ }
5909
+ }
5897
5910
  }
5898
5911
 
5899
5912
  export { CANVAS_EVENTS, CanvasEvents, OdBaseDragger, Options, Viewer, commands, defaultOptions };