@inweb/client 25.3.2 → 25.3.4

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/client.js CHANGED
@@ -3925,7 +3925,7 @@
3925
3925
  .then((data) => ({
3926
3926
  ...data,
3927
3927
  server: data.version,
3928
- client: "25.3.2",
3928
+ client: "25.3.4",
3929
3929
  }));
3930
3930
  }
3931
3931
  /**
@@ -19160,7 +19160,6 @@
19160
19160
  this._isInitialized = false;
19161
19161
  this._zIndex = 1;
19162
19162
  this._markupContainerName = "markupContainer";
19163
- this.TEXT_FONT_FAMILY = "Calibri";
19164
19163
  this.lineWidth = 4;
19165
19164
  this.changeActiveDragger = (event) => {
19166
19165
  const draggerName = event.data;
@@ -19266,8 +19265,9 @@
19266
19265
  this.loadMarkup(viewpoint);
19267
19266
  }
19268
19267
  getViewpoint() {
19268
+ // TODO: at the current 25.2 state we need VisualizeJS here and below. In the future we need to use it as an external interface
19269
19269
  if (!this._viewer.visualizeJs)
19270
- return {};
19270
+ return { file_id: "" };
19271
19271
  const viewpoint = {
19272
19272
  lines: [],
19273
19273
  texts: [],
@@ -20180,7 +20180,7 @@
20180
20180
  return { x: array[0], y: array[1], z: array[2] };
20181
20181
  }
20182
20182
  if (!this._viewer.visualizeJs)
20183
- return {};
20183
+ return { file_id: "" };
20184
20184
  const visLib = this._viewer.visLib();
20185
20185
  const visViewer = visLib.getViewer();
20186
20186
  const viewpoint = {
@@ -20253,9 +20253,6 @@
20253
20253
  clearSelected() {
20254
20254
  throw new Error("Not implemented yet");
20255
20255
  }
20256
- getPoint3dFromArray(array) {
20257
- return { x: array[0], y: array[1], z: array[2] };
20258
- }
20259
20256
  }
20260
20257
 
20261
20258
  class MarkupFactory {
@@ -20398,6 +20395,7 @@
20398
20395
  canvas.style.width = "100%";
20399
20396
  canvas.style.height = "100%";
20400
20397
  }
20398
+ canvas.parentElement.style.touchAction = "none";
20401
20399
  canvas.style.touchAction = "none";
20402
20400
  canvas.width = canvas.clientWidth * window.devicePixelRatio;
20403
20401
  canvas.height = canvas.clientHeight * window.devicePixelRatio;
@@ -21124,8 +21122,8 @@
21124
21122
  * @param viewpoint - Viewpoint.
21125
21123
  */
21126
21124
  drawViewpoint(viewpoint) {
21127
- this.setOrthogonalCameraSettings(viewpoint);
21128
- this.setClippingPlanes(viewpoint);
21125
+ this.setOrthogonalCameraSettings(viewpoint.orthogonal_camera);
21126
+ this.setClippingPlanes(viewpoint.clipping_planes);
21129
21127
  this.markup.setViewpoint(viewpoint);
21130
21128
  }
21131
21129
  /**
@@ -21156,14 +21154,14 @@
21156
21154
  field_height: activeView.viewFieldHeight,
21157
21155
  };
21158
21156
  }
21159
- setOrthogonalCameraSettings(viewpoint) {
21157
+ setOrthogonalCameraSettings(settings) {
21160
21158
  const visViewer = this.visViewer();
21161
21159
  const activeView = visViewer.activeView;
21162
21160
  this.resetActiveDragger();
21163
21161
  this.clearSlices();
21164
21162
  this.clearOverlay();
21165
- if (viewpoint.orthogonal_camera) {
21166
- activeView.setView(this.getLogicalPoint3dAsArray(viewpoint.orthogonal_camera.view_point), this.getLogicalPoint3dAsArray(viewpoint.orthogonal_camera.direction), this.getLogicalPoint3dAsArray(viewpoint.orthogonal_camera.up_vector), viewpoint.orthogonal_camera.field_width, viewpoint.orthogonal_camera.field_height, true);
21163
+ if (settings) {
21164
+ activeView.setView(this.getLogicalPoint3dAsArray(settings.view_point), this.getLogicalPoint3dAsArray(settings.direction), this.getLogicalPoint3dAsArray(settings.up_vector), settings.field_width, settings.field_height, true);
21167
21165
  }
21168
21166
  this.syncOverlay();
21169
21167
  }
@@ -21181,11 +21179,11 @@
21181
21179
  }
21182
21180
  return clipping_planes;
21183
21181
  }
21184
- setClippingPlanes(viewpoint) {
21185
- if (viewpoint.clipping_planes) {
21182
+ setClippingPlanes(clippingPlanes) {
21183
+ if (clippingPlanes) {
21186
21184
  const visViewer = this.visViewer();
21187
21185
  const activeView = visViewer.activeView;
21188
- for (const plane of viewpoint.clipping_planes) {
21186
+ for (const plane of clippingPlanes) {
21189
21187
  const cuttingPlane = new (this.visLib().OdTvPlane)();
21190
21188
  cuttingPlane.set(this.getLogicalPoint3dAsArray(plane.location), this.getLogicalPoint3dAsArray(plane.direction));
21191
21189
  activeView.addCuttingPlane(cuttingPlane);
@@ -21518,7 +21516,7 @@
21518
21516
  commands("VisualizeJS").registerCommand("zoomToSelected", zoomToSelected);
21519
21517
 
21520
21518
  ///////////////////////////////////////////////////////////////////////////////
21521
- const version = "25.3.2";
21519
+ const version = "25.3.4";
21522
21520
 
21523
21521
  exports.Assembly = Assembly;
21524
21522
  exports.CANVAS_EVENTS = CANVAS_EVENTS;