@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.
@@ -356,4 +356,5 @@ export declare class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventM
356
356
  * @returns A returned value of the given command. Returns `undefined` when the command doesn't exists.
357
357
  */
358
358
  executeCommand(id: string, ...args: any[]): any;
359
+ deviceAutoRegeneration(): void;
359
360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/viewer-visualize",
3
- "version": "25.6.4",
3
+ "version": "25.6.6",
4
4
  "description": "3D CAD and BIM data Viewer powered by Visualize",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -29,9 +29,9 @@
29
29
  "ts-docs": "typedoc"
30
30
  },
31
31
  "dependencies": {
32
- "@inweb/client": "~25.6.4",
33
- "@inweb/eventemitter2": "~25.6.4",
34
- "@inweb/viewer-core": "~25.6.4"
32
+ "@inweb/client": "~25.6.6",
33
+ "@inweb/eventemitter2": "~25.6.6",
34
+ "@inweb/viewer-core": "~25.6.6"
35
35
  },
36
36
  "devDependencies": {
37
37
  "canvas": "^2.11.2",
@@ -35,6 +35,7 @@ function zoomToExtents(viewer: Viewer, force = false, animate = viewer.options.c
35
35
  visViewer.update();
36
36
  visViewer.setEnableAnimation(saveEnableAmination);
37
37
 
38
+ viewer.deviceAutoRegeneration();
38
39
  viewer.update();
39
40
  viewer.emitEvent({ type: "zoom" });
40
41
  }
@@ -38,6 +38,7 @@ function zoomToObjects(viewer: Viewer, handles: string[] = []): void {
38
38
 
39
39
  visViewer.zoomToObjects?.(selectionSet);
40
40
 
41
+ viewer.deviceAutoRegeneration();
41
42
  viewer.update();
42
43
  viewer.emitEvent({ type: "zoom" });
43
44
 
@@ -32,6 +32,7 @@ function zoomToSelected(viewer: Viewer): void {
32
32
  const selectionSet = visViewer.getSelected();
33
33
  visViewer.zoomToObjects?.(selectionSet);
34
34
 
35
+ viewer.deviceAutoRegeneration();
35
36
  viewer.update();
36
37
  viewer.emitEvent({ type: "zoom" });
37
38
  }
@@ -36,6 +36,7 @@ export class ZoomAction {
36
36
  const viewer = this._m_module.getViewer();
37
37
  viewer.zoomAt(zoomFactor, x, y);
38
38
 
39
+ this._subject.deviceAutoRegeneration();
39
40
  this._subject.activeDragger()?.updatePreview();
40
41
  this._subject.emitEvent({
41
42
  type: "zoomat",
@@ -1205,4 +1205,15 @@ export class Viewer extends EventEmitter2<ViewerEventMap & OptionsEventMap> impl
1205
1205
  executeCommand(id: string, ...args: any[]): any {
1206
1206
  return commands("VisualizeJS").executeCommand(id, this, ...args);
1207
1207
  }
1208
+
1209
+ public deviceAutoRegeneration() {
1210
+ const visViewer = this.visViewer();
1211
+ const device = visViewer.getActiveDevice();
1212
+
1213
+ const coef = device.getOptionDouble(this.visLib().DeviceOptions.kRegenCoef);
1214
+ if (coef > 1.0) {
1215
+ visViewer.regenAll();
1216
+ this.update();
1217
+ }
1218
+ }
1208
1219
  }