@inweb/viewer-visualize 25.12.0 → 25.12.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.
@@ -35,7 +35,7 @@ class Commands {
35
35
  }
36
36
  const {handler: handler, thisArg: thisArg} = command;
37
37
  const result = handler.apply(thisArg, [ viewer, ...args ]);
38
- viewer === null || viewer === void 0 ? void 0 : viewer.emit({
38
+ viewer === null || viewer === undefined ? undefined : viewer.emit({
39
39
  type: "command",
40
40
  data: id,
41
41
  args: args
@@ -411,7 +411,7 @@ function applyModelTransform(viewer, model) {
411
411
  }
412
412
  }
413
413
  modelItr.delete();
414
- (_a = visViewer.clearViewExtentsCache) === null || _a === void 0 ? void 0 : _a.call(visViewer);
414
+ (_a = visViewer.clearViewExtentsCache) === null || _a === undefined ? undefined : _a.call(visViewer);
415
415
  viewer.update();
416
416
  }
417
417
 
@@ -442,7 +442,7 @@ commands("VisualizeJS").registerCommand("clearSlices", (viewer => viewer.clearSl
442
442
  function createPreview(viewer, type = "image/jpeg", encoderOptions = .25) {
443
443
  var _a;
444
444
  if (!viewer.visualizeJs) return "";
445
- return ((_a = viewer.canvas) === null || _a === void 0 ? void 0 : _a.toDataURL(type, encoderOptions)) || "";
445
+ return ((_a = viewer.canvas) === null || _a === undefined ? undefined : _a.toDataURL(type, encoderOptions)) || "";
446
446
  }
447
447
 
448
448
  commands("VisualizeJS").registerCommand("createPreview", createPreview);
@@ -642,7 +642,7 @@ function setSelected(viewer, handles = []) {
642
642
  const visLib = viewer.visLib();
643
643
  const visViewer = visLib.getViewer();
644
644
  const selectionSet = new visLib.OdTvSelectionSet;
645
- handles === null || handles === void 0 ? void 0 : handles.forEach((handle => {
645
+ handles === null || handles === undefined ? undefined : handles.forEach((handle => {
646
646
  const entityId = visViewer.getEntityByOriginalHandle(handle + "");
647
647
  if (!entityId.isNull()) selectionSet.appendEntity(entityId);
648
648
  }));
@@ -699,7 +699,7 @@ function zoomToObjects(viewer, handles = []) {
699
699
  const entityId = visViewer.getEntityByOriginalHandle(handle + "");
700
700
  if (!entityId.isNull()) selectionSet.appendEntity(entityId);
701
701
  }));
702
- (_a = visViewer.zoomToObjects) === null || _a === void 0 ? void 0 : _a.call(visViewer, selectionSet);
702
+ (_a = visViewer.zoomToObjects) === null || _a === undefined ? undefined : _a.call(visViewer, selectionSet);
703
703
  viewer.deviceAutoRegeneration();
704
704
  viewer.update();
705
705
  viewer.emitEvent({
@@ -715,7 +715,7 @@ function zoomToSelected(viewer) {
715
715
  if (!viewer.visualizeJs) return;
716
716
  const visViewer = viewer.visViewer();
717
717
  const selectionSet = visViewer.getSelected();
718
- (_a = visViewer.zoomToObjects) === null || _a === void 0 ? void 0 : _a.call(visViewer, selectionSet);
718
+ (_a = visViewer.zoomToObjects) === null || _a === undefined ? undefined : _a.call(visViewer, selectionSet);
719
719
  viewer.deviceAutoRegeneration();
720
720
  viewer.update();
721
721
  viewer.emitEvent({
@@ -775,7 +775,7 @@ async function autoTransformAllModelsToCentralPoint(viewer, model) {
775
775
  modelPtr.delete();
776
776
  }
777
777
  modelItr.delete();
778
- (_a = visViewer.clearViewExtentsCache) === null || _a === void 0 ? void 0 : _a.call(visViewer);
778
+ (_a = visViewer.clearViewExtentsCache) === null || _a === undefined ? undefined : _a.call(visViewer);
779
779
  viewer.update();
780
780
  }
781
781
 
@@ -853,8 +853,8 @@ class KonvaLine {
853
853
  const konvaPoints = [];
854
854
  params.points.forEach((point => konvaPoints.push(point.x, point.y)));
855
855
  this._ref = new Konva.Line({
856
- stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
857
- strokeWidth: (_b = params.width) !== null && _b !== void 0 ? _b : 4,
856
+ stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
857
+ strokeWidth: (_b = params.width) !== null && _b !== undefined ? _b : 4,
858
858
  globalCompositeOperation: "source-over",
859
859
  lineCap: "round",
860
860
  lineJoin: "round",
@@ -961,12 +961,12 @@ class KonvaText {
961
961
  x: params.position.x,
962
962
  y: params.position.y,
963
963
  text: params.text,
964
- fontSize: (_a = params.fontSize) !== null && _a !== void 0 ? _a : 34,
964
+ fontSize: (_a = params.fontSize) !== null && _a !== undefined ? _a : 34,
965
965
  fontFamily: this.TEXT_FONT_FAMILY,
966
- fill: (_b = params.color) !== null && _b !== void 0 ? _b : "#ff0000",
966
+ fill: (_b = params.color) !== null && _b !== undefined ? _b : "#ff0000",
967
967
  align: "left",
968
968
  draggable: true,
969
- rotation: (_c = params.rotation) !== null && _c !== void 0 ? _c : 0
969
+ rotation: (_c = params.rotation) !== null && _c !== undefined ? _c : 0
970
970
  });
971
971
  this._ref.width(this._ref.getTextWidth());
972
972
  this._ref.on("transform", (e => {
@@ -1064,15 +1064,15 @@ class KonvaRectangle {
1064
1064
  y: 100
1065
1065
  };
1066
1066
  this._ref = new Konva.Rect({
1067
- stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
1068
- strokeWidth: (_b = params.lineWidth) !== null && _b !== void 0 ? _b : 4,
1067
+ stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
1068
+ strokeWidth: (_b = params.lineWidth) !== null && _b !== undefined ? _b : 4,
1069
1069
  globalCompositeOperation: "source-over",
1070
1070
  lineCap: "round",
1071
1071
  lineJoin: "round",
1072
1072
  x: params.position.x,
1073
1073
  y: params.position.y,
1074
- width: (_c = params.width) !== null && _c !== void 0 ? _c : 200,
1075
- height: (_d = params.height) !== null && _d !== void 0 ? _d : 200,
1074
+ width: (_c = params.width) !== null && _c !== undefined ? _c : 200,
1075
+ height: (_d = params.height) !== null && _d !== undefined ? _d : 200,
1076
1076
  draggable: true,
1077
1077
  strokeScaleEnabled: false
1078
1078
  });
@@ -1182,8 +1182,8 @@ class KonvaEllipse {
1182
1182
  y: 25
1183
1183
  };
1184
1184
  this._ref = new Konva.Ellipse({
1185
- stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
1186
- strokeWidth: (_b = params.lineWidth) !== null && _b !== void 0 ? _b : 4,
1185
+ stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
1186
+ strokeWidth: (_b = params.lineWidth) !== null && _b !== undefined ? _b : 4,
1187
1187
  globalCompositeOperation: "source-over",
1188
1188
  lineCap: "round",
1189
1189
  lineJoin: "round",
@@ -1312,8 +1312,8 @@ class KonvaArrow {
1312
1312
  y: 100
1313
1313
  };
1314
1314
  this._ref = new Konva.Arrow({
1315
- stroke: (_a = params.color) !== null && _a !== void 0 ? _a : "#ff0000",
1316
- fill: (_b = params.color) !== null && _b !== void 0 ? _b : "#ff0000",
1315
+ stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
1316
+ fill: (_b = params.color) !== null && _b !== undefined ? _b : "#ff0000",
1317
1317
  strokeWidth: 4,
1318
1318
  globalCompositeOperation: "source-over",
1319
1319
  lineCap: "round",
@@ -1453,8 +1453,8 @@ class KonvaImage {
1453
1453
  x: params.position.x,
1454
1454
  y: params.position.y,
1455
1455
  image: this._canvasImage,
1456
- width: (_a = params.width) !== null && _a !== void 0 ? _a : 0,
1457
- height: (_b = params.height) !== null && _b !== void 0 ? _b : 0,
1456
+ width: (_a = params.width) !== null && _a !== undefined ? _a : 0,
1457
+ height: (_b = params.height) !== null && _b !== undefined ? _b : 0,
1458
1458
  draggable: true
1459
1459
  });
1460
1460
  this._ref.on("transform", (e => {
@@ -1564,10 +1564,10 @@ class KonvaCloud {
1564
1564
  this._ref = new Konva.Shape({
1565
1565
  x: params.position.x,
1566
1566
  y: params.position.y,
1567
- width: (_a = params.width) !== null && _a !== void 0 ? _a : 200,
1568
- height: (_b = params.height) !== null && _b !== void 0 ? _b : 200,
1569
- stroke: (_c = params.color) !== null && _c !== void 0 ? _c : "#ff0000",
1570
- strokeWidth: (_d = params.lineWidth) !== null && _d !== void 0 ? _d : 4,
1567
+ width: (_a = params.width) !== null && _a !== undefined ? _a : 200,
1568
+ height: (_b = params.height) !== null && _b !== undefined ? _b : 200,
1569
+ stroke: (_c = params.color) !== null && _c !== undefined ? _c : "#ff0000",
1570
+ strokeWidth: (_d = params.lineWidth) !== null && _d !== undefined ? _d : 4,
1571
1571
  draggable: true,
1572
1572
  strokeScaleEnabled: false,
1573
1573
  globalCompositeOperation: "source-over",
@@ -1816,9 +1816,9 @@ class KonvaMarkup {
1816
1816
  initialize(container, containerEvents, viewer, worldTransformer) {
1817
1817
  if (!Konva) throw new Error('Markup error: Konva is not initialized. Forgot to add <script src="https://unpkg.com/konva@9/konva.min.js"><\/script> to your page?');
1818
1818
  this._viewer = viewer;
1819
- this._worldTransformer = worldTransformer !== null && worldTransformer !== void 0 ? worldTransformer : new WorldTransform;
1819
+ this._worldTransformer = worldTransformer !== null && worldTransformer !== undefined ? worldTransformer : new WorldTransform;
1820
1820
  this._container = container;
1821
- this._containerEvents = containerEvents !== null && containerEvents !== void 0 ? containerEvents : [];
1821
+ this._containerEvents = containerEvents !== null && containerEvents !== undefined ? containerEvents : [];
1822
1822
  this._markupContainer = document.createElement("div");
1823
1823
  this._markupContainer.id = "markup-container";
1824
1824
  this._markupContainer.style.position = "absolute";
@@ -1846,9 +1846,9 @@ class KonvaMarkup {
1846
1846
  this._viewer.removeEventListener("changeactivedragger", this.changeActiveDragger);
1847
1847
  }
1848
1848
  this.destroyKonva();
1849
- (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
1849
+ (_a = this._resizeObserver) === null || _a === undefined ? undefined : _a.disconnect();
1850
1850
  this._resizeObserver = undefined;
1851
- (_b = this._markupContainer) === null || _b === void 0 ? void 0 : _b.remove();
1851
+ (_b = this._markupContainer) === null || _b === undefined ? undefined : _b.remove();
1852
1852
  this._markupContainer = undefined;
1853
1853
  this._container = undefined;
1854
1854
  this._viewer = undefined;
@@ -1880,14 +1880,14 @@ class KonvaMarkup {
1880
1880
  const hexColor = new MarkupColor(r, g, b).asHex();
1881
1881
  this.getObjects().filter((obj => {
1882
1882
  var _a;
1883
- return (_a = obj.setColor) === null || _a === void 0 ? void 0 : _a.call(obj, hexColor);
1883
+ return (_a = obj.setColor) === null || _a === undefined ? undefined : _a.call(obj, hexColor);
1884
1884
  }));
1885
1885
  }
1886
1886
  colorizeSelectedMarkups(r, g, b) {
1887
1887
  const hexColor = new MarkupColor(r, g, b).asHex();
1888
1888
  this.getSelectedObjects().filter((obj => {
1889
1889
  var _a;
1890
- return (_a = obj.setColor) === null || _a === void 0 ? void 0 : _a.call(obj, hexColor);
1890
+ return (_a = obj.setColor) === null || _a === undefined ? undefined : _a.call(obj, hexColor);
1891
1891
  }));
1892
1892
  }
1893
1893
  setViewpoint(viewpoint) {
@@ -1903,13 +1903,13 @@ class KonvaMarkup {
1903
1903
  x: 0,
1904
1904
  y: 0
1905
1905
  });
1906
- const markupColor = ((_a = viewpoint.custom_fields) === null || _a === void 0 ? void 0 : _a.markup_color) || {
1906
+ const markupColor = ((_a = viewpoint.custom_fields) === null || _a === undefined ? undefined : _a.markup_color) || {
1907
1907
  r: 255,
1908
1908
  g: 0,
1909
1909
  b: 0
1910
1910
  };
1911
1911
  this.setMarkupColor(markupColor.r, markupColor.g, markupColor.b);
1912
- (_b = viewpoint.lines) === null || _b === void 0 ? void 0 : _b.forEach((line => {
1912
+ (_b = viewpoint.lines) === null || _b === undefined ? undefined : _b.forEach((line => {
1913
1913
  const linePoints = [];
1914
1914
  line.points.forEach((point => {
1915
1915
  const screenPoint = this._worldTransformer.worldToScreen(point);
@@ -1918,28 +1918,28 @@ class KonvaMarkup {
1918
1918
  }));
1919
1919
  this.addLine(linePoints, line.color, line.type, line.width, line.id);
1920
1920
  }));
1921
- (_c = viewpoint.texts) === null || _c === void 0 ? void 0 : _c.forEach((text => {
1921
+ (_c = viewpoint.texts) === null || _c === undefined ? undefined : _c.forEach((text => {
1922
1922
  const screenPoint = this._worldTransformer.worldToScreen(text.position);
1923
1923
  this.addText(text.text, screenPoint, text.angle, text.color, text.text_size, text.font_size, text.id);
1924
1924
  }));
1925
- (_d = viewpoint.rectangles) === null || _d === void 0 ? void 0 : _d.forEach((rect => {
1925
+ (_d = viewpoint.rectangles) === null || _d === undefined ? undefined : _d.forEach((rect => {
1926
1926
  const screenPoint = this._worldTransformer.worldToScreen(rect.position);
1927
1927
  this.addRectangle(screenPoint, rect.width, rect.height, rect.line_width, rect.color, rect.id);
1928
1928
  }));
1929
- (_e = viewpoint.ellipses) === null || _e === void 0 ? void 0 : _e.forEach((ellipse => {
1929
+ (_e = viewpoint.ellipses) === null || _e === undefined ? undefined : _e.forEach((ellipse => {
1930
1930
  const screenPoint = this._worldTransformer.worldToScreen(ellipse.position);
1931
1931
  this.addEllipse(screenPoint, ellipse.radius, ellipse.line_width, ellipse.color, ellipse.id);
1932
1932
  }));
1933
- (_f = viewpoint.arrows) === null || _f === void 0 ? void 0 : _f.forEach((arrow => {
1933
+ (_f = viewpoint.arrows) === null || _f === undefined ? undefined : _f.forEach((arrow => {
1934
1934
  const startPoint = this._worldTransformer.worldToScreen(arrow.start);
1935
1935
  const endPoint = this._worldTransformer.worldToScreen(arrow.end);
1936
1936
  this.addArrow(startPoint, endPoint, arrow.color, arrow.id);
1937
1937
  }));
1938
- (_g = viewpoint.clouds) === null || _g === void 0 ? void 0 : _g.forEach((cloud => {
1938
+ (_g = viewpoint.clouds) === null || _g === undefined ? undefined : _g.forEach((cloud => {
1939
1939
  const screenPoint = this._worldTransformer.worldToScreen(cloud.position);
1940
1940
  this.addCloud(screenPoint, cloud.width, cloud.height, cloud.line_width, cloud.color, cloud.id);
1941
1941
  }));
1942
- (_h = viewpoint.images) === null || _h === void 0 ? void 0 : _h.forEach((image => {
1942
+ (_h = viewpoint.images) === null || _h === undefined ? undefined : _h.forEach((image => {
1943
1943
  const screenPoint = this._worldTransformer.worldToScreen(image.position);
1944
1944
  this.addImage(screenPoint, image.src, image.width, image.height, image.id);
1945
1945
  }));
@@ -2233,7 +2233,7 @@ class KonvaMarkup {
2233
2233
  this.removeTextInput();
2234
2234
  this.removeImageInput();
2235
2235
  this.clearOverlay();
2236
- (_a = this._konvaStage) === null || _a === void 0 ? void 0 : _a.destroy();
2236
+ (_a = this._konvaStage) === null || _a === undefined ? undefined : _a.destroy();
2237
2237
  this._groupImages = undefined;
2238
2238
  this._groupGeometry = undefined;
2239
2239
  this._groupTexts = undefined;
@@ -2483,7 +2483,7 @@ class KonvaMarkup {
2483
2483
  }
2484
2484
  removeTextInput() {
2485
2485
  var _a;
2486
- (_a = this._textInputRef) === null || _a === void 0 ? void 0 : _a.remove();
2486
+ (_a = this._textInputRef) === null || _a === undefined ? undefined : _a.remove();
2487
2487
  this._textInputRef = null;
2488
2488
  this._textInputPos = null;
2489
2489
  this._textInputAngle = 0;
@@ -2526,14 +2526,14 @@ class KonvaMarkup {
2526
2526
  }
2527
2527
  removeImageInput() {
2528
2528
  var _a;
2529
- (_a = this._imageInputRef) === null || _a === void 0 ? void 0 : _a.remove();
2529
+ (_a = this._imageInputRef) === null || _a === undefined ? undefined : _a.remove();
2530
2530
  this._imageInputRef = null;
2531
2531
  this._imageInputPos = null;
2532
2532
  }
2533
2533
  addText(text, position, angle, color, textSize, fontSize, id) {
2534
2534
  var _a;
2535
2535
  if (!text) return;
2536
- (_a = this.getSelectedObjects().at(0)) === null || _a === void 0 ? void 0 : _a.delete();
2536
+ (_a = this.getSelectedObjects().at(0)) === null || _a === undefined ? undefined : _a.delete();
2537
2537
  this.clearSelected();
2538
2538
  this.removeTextInput();
2539
2539
  const tolerance = 1e-6;
@@ -2608,7 +2608,7 @@ class KonvaMarkup {
2608
2608
  addImage(position, src, width, height, id) {
2609
2609
  var _a;
2610
2610
  if (!position || !src) return;
2611
- (_a = this.getSelectedObjects().at(0)) === null || _a === void 0 ? void 0 : _a.delete();
2611
+ (_a = this.getSelectedObjects().at(0)) === null || _a === undefined ? undefined : _a.delete();
2612
2612
  this.clearSelected();
2613
2613
  this.removeImageInput();
2614
2614
  const konvaImage = new KonvaImage({
@@ -2670,7 +2670,7 @@ class OdaGeAction {
2670
2670
  var _a;
2671
2671
  const extView = this.m_module.getViewer().getActiveTvExtendedView();
2672
2672
  extView.setView(params.position, params.target, params.upVector, params.viewFieldWidth, params.viewFieldHeight, params.perspective);
2673
- (_a = extView.delete) === null || _a === void 0 ? void 0 : _a.call(extView);
2673
+ (_a = extView.delete) === null || _a === undefined ? undefined : _a.call(extView);
2674
2674
  };
2675
2675
  this.getViewParams = () => {
2676
2676
  var _a;
@@ -2683,7 +2683,7 @@ class OdaGeAction {
2683
2683
  viewFieldHeight: view.viewFieldHeight,
2684
2684
  perspective: view.perspective
2685
2685
  };
2686
- (_a = view.delete) === null || _a === void 0 ? void 0 : _a.call(view);
2686
+ (_a = view.delete) === null || _a === undefined ? undefined : _a.call(view);
2687
2687
  return obj;
2688
2688
  };
2689
2689
  this.m_module = module;
@@ -2905,7 +2905,7 @@ class OdBaseDragger extends OdaGeAction {
2905
2905
  deleteAll(objects) {
2906
2906
  var _a;
2907
2907
  for (const obj of objects) {
2908
- (_a = obj === null || obj === void 0 ? void 0 : obj.delete) === null || _a === void 0 ? void 0 : _a.call(obj);
2908
+ (_a = obj === null || obj === undefined ? undefined : obj.delete) === null || _a === undefined ? undefined : _a.call(obj);
2909
2909
  }
2910
2910
  }
2911
2911
  updatePreview() {}
@@ -3274,7 +3274,7 @@ class MeasureLineDragger extends OdBaseDragger {
3274
3274
  };
3275
3275
  this.items = [];
3276
3276
  this.canvasEvents.push("resize");
3277
- this.oldRulerUnit = (_a = subject.options.rulerUnit) !== null && _a !== void 0 ? _a : "Default";
3277
+ this.oldRulerUnit = (_a = subject.options.rulerUnit) !== null && _a !== undefined ? _a : "Default";
3278
3278
  this.optionsChange = this.optionsChange.bind(this);
3279
3279
  }
3280
3280
  initialize() {
@@ -3383,7 +3383,7 @@ class MeasureLineDragger extends OdBaseDragger {
3383
3383
  optionsChange(event) {
3384
3384
  var _a;
3385
3385
  const options = event.data;
3386
- const toUnitName = (_a = options.rulerUnit) !== null && _a !== void 0 ? _a : "Default";
3386
+ const toUnitName = (_a = options.rulerUnit) !== null && _a !== undefined ? _a : "Default";
3387
3387
  if (this.oldRulerUnit === toUnitName) return;
3388
3388
  this.oldRulerUnit = toUnitName;
3389
3389
  const drawingUnit = this.m_module.getViewer().getUnit();
@@ -3508,7 +3508,7 @@ class OdaWalkDragger extends OdBaseDragger {
3508
3508
  const model = this.viewer.getActiveModel();
3509
3509
  model.removeEntity(this.cameraId);
3510
3510
  model.delete();
3511
- (_a = this.cameraWalker) === null || _a === void 0 ? void 0 : _a.delete();
3511
+ (_a = this.cameraWalker) === null || _a === undefined ? undefined : _a.delete();
3512
3512
  }
3513
3513
  if (this.viewParams) {
3514
3514
  this.setViewParams(this.viewParams);
@@ -3851,7 +3851,7 @@ class OrbitAction {
3851
3851
  const extView = this.getViewer().getActiveTvExtendedView();
3852
3852
  extView.setView(viewParams.position, viewParams.target, viewParams.upVector, viewParams.viewFieldWidth, viewParams.viewFieldHeight, viewParams.perspective);
3853
3853
  extView.delete();
3854
- (_a = this._subject.activeDragger()) === null || _a === void 0 ? void 0 : _a.updatePreview();
3854
+ (_a = this._subject.activeDragger()) === null || _a === undefined ? undefined : _a.updatePreview();
3855
3855
  }
3856
3856
  endAction() {
3857
3857
  this._endInteractivity();
@@ -3956,7 +3956,7 @@ class OrbitAction {
3956
3956
  deleteAll(objects) {
3957
3957
  var _a;
3958
3958
  for (const obj of objects) {
3959
- (_a = obj === null || obj === void 0 ? void 0 : obj.delete) === null || _a === void 0 ? void 0 : _a.call(obj);
3959
+ (_a = obj === null || obj === undefined ? undefined : obj.delete) === null || _a === undefined ? undefined : _a.call(obj);
3960
3960
  }
3961
3961
  }
3962
3962
  }
@@ -4023,7 +4023,7 @@ class PanAction {
4023
4023
  targetWithDelta.delete();
4024
4024
  position.delete();
4025
4025
  positionWithDelta.delete();
4026
- (_a = this._subject.activeDragger()) === null || _a === void 0 ? void 0 : _a.updatePreview();
4026
+ (_a = this._subject.activeDragger()) === null || _a === undefined ? undefined : _a.updatePreview();
4027
4027
  this._subject.emitEvent({
4028
4028
  type: "pan",
4029
4029
  x: absoluteX,
@@ -4076,7 +4076,7 @@ class ZoomAction {
4076
4076
  const viewer = this._m_module.getViewer();
4077
4077
  viewer.zoomAt(zoomFactor, x, y);
4078
4078
  this._subject.deviceAutoRegeneration();
4079
- (_a = this._subject.activeDragger()) === null || _a === void 0 ? void 0 : _a.updatePreview();
4079
+ (_a = this._subject.activeDragger()) === null || _a === undefined ? undefined : _a.updatePreview();
4080
4080
  this._subject.emitEvent({
4081
4081
  type: "zoomat",
4082
4082
  data: zoomFactor,
@@ -5081,7 +5081,7 @@ class OdaTextDragger extends OdBaseDragger {
5081
5081
  dispose() {
5082
5082
  var _a;
5083
5083
  super.dispose();
5084
- (_a = this.textRef) === null || _a === void 0 ? void 0 : _a.remove();
5084
+ (_a = this.textRef) === null || _a === undefined ? undefined : _a.remove();
5085
5085
  this.textRef = null;
5086
5086
  }
5087
5087
  _finishInput() {
@@ -5089,7 +5089,7 @@ class OdaTextDragger extends OdBaseDragger {
5089
5089
  if (this.textRef && this.textRef.value.trimLeft()) {
5090
5090
  this._updateFrame();
5091
5091
  }
5092
- (_a = this.textRef) === null || _a === void 0 ? void 0 : _a.remove();
5092
+ (_a = this.textRef) === null || _a === undefined ? undefined : _a.remove();
5093
5093
  this.textRef = null;
5094
5094
  }
5095
5095
  start(x, y, absoluteX, absoluteY) {
@@ -5133,7 +5133,7 @@ class OdaTextDragger extends OdBaseDragger {
5133
5133
  const projMtrx = view.projectionMatrix;
5134
5134
  const mtrxNumber = projMtrx.get(1, 1);
5135
5135
  const tol = 1e-6;
5136
- if (!(mtrxNumber < tol && mtrxNumber > -tol)) {
5136
+ if (!(mtrxNumber < tol && mtrxNumber > -1e-6)) {
5137
5137
  textScale = 1 / mtrxNumber;
5138
5138
  }
5139
5139
  const geomData = entityPtr.appendText(this.toGePoint(this.m_center), this.textRef.value.trimLeft());
@@ -5381,7 +5381,7 @@ class Viewer extends EventEmitter2 {
5381
5381
  this.registerDragger("Walk", OdaWalkDragger);
5382
5382
  this.canvasEvents = CANVAS_EVENTS.slice();
5383
5383
  this.canvaseventlistener = event => this.emit(event);
5384
- this._enableAutoUpdate = (_a = params.enableAutoUpdate) !== null && _a !== void 0 ? _a : true;
5384
+ this._enableAutoUpdate = (_a = params.enableAutoUpdate) !== null && _a !== undefined ? _a : true;
5385
5385
  this._isNeedRender = false;
5386
5386
  this._isRunAsyncUpdate = false;
5387
5387
  this.render = this.render.bind(this);
@@ -5398,7 +5398,7 @@ class Viewer extends EventEmitter2 {
5398
5398
  return this._markup;
5399
5399
  }
5400
5400
  configure(params) {
5401
- this._visualizeJsUrl = params.visualizeJsUrl || "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/master/Visualize.js";
5401
+ this._visualizeJsUrl = params.visualizeJsUrl || "https://public-fhemb7e3embacwec.z02.azurefd.net/libs/visualizejs/25.12/Visualize.js";
5402
5402
  return this;
5403
5403
  }
5404
5404
  async initialize(canvas, onProgress) {
@@ -5488,7 +5488,7 @@ class Viewer extends EventEmitter2 {
5488
5488
  const visViewer = this.visualizeJs.getViewer();
5489
5489
  if (visViewer.isRunningAnimation() || this._isNeedRender) {
5490
5490
  visViewer.update();
5491
- (_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.updatePreview();
5491
+ (_a = this._activeDragger) === null || _a === undefined ? undefined : _a.updatePreview();
5492
5492
  this._isNeedRender = !visViewer.getActiveDevice().isValid();
5493
5493
  const deltaTime = (time - this._renderTime) / 1e3;
5494
5494
  this._renderTime = time;
@@ -5519,8 +5519,8 @@ class Viewer extends EventEmitter2 {
5519
5519
  var _a, _b;
5520
5520
  if (this._enableAutoUpdate) {
5521
5521
  if (force) {
5522
- (_a = this.visViewer()) === null || _a === void 0 ? void 0 : _a.update();
5523
- (_b = this.activeDragger()) === null || _b === void 0 ? void 0 : _b.updatePreview();
5522
+ (_a = this.visViewer()) === null || _a === undefined ? undefined : _a.update();
5523
+ (_b = this.activeDragger()) === null || _b === undefined ? undefined : _b.updatePreview();
5524
5524
  } else {
5525
5525
  this._isNeedRender = true;
5526
5526
  }
@@ -5573,7 +5573,7 @@ class Viewer extends EventEmitter2 {
5573
5573
  }
5574
5574
  visViewer() {
5575
5575
  var _a;
5576
- return (_a = this.visualizeJs) === null || _a === void 0 ? void 0 : _a.getViewer();
5576
+ return (_a = this.visualizeJs) === null || _a === undefined ? undefined : _a.getViewer();
5577
5577
  }
5578
5578
  syncOpenCloudVisualStyle(isInitializing) {
5579
5579
  if (!this.visualizeJs) return this;
@@ -5709,7 +5709,7 @@ class Viewer extends EventEmitter2 {
5709
5709
  }
5710
5710
  setActiveDragger(name = "") {
5711
5711
  var _a;
5712
- if (((_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.name) !== name) {
5712
+ if (((_a = this._activeDragger) === null || _a === undefined ? undefined : _a.name) !== name) {
5713
5713
  if (this._activeDragger) {
5714
5714
  this._activeDragger.dispose();
5715
5715
  this._activeDragger = null;
@@ -5826,11 +5826,11 @@ class Viewer extends EventEmitter2 {
5826
5826
  const projMatrix = this.visViewer().activeView.projectionMatrix;
5827
5827
  const tolerance = 1e-6;
5828
5828
  const x = projMatrix.get(0, 0);
5829
- if (x > tolerance || x < -tolerance) result.x = 1 / x;
5829
+ if (x > tolerance || x < -1e-6) result.x = 1 / x;
5830
5830
  const y = projMatrix.get(1, 1);
5831
- if (y > tolerance || y < -tolerance) result.y = 1 / y;
5831
+ if (y > tolerance || y < -1e-6) result.y = 1 / y;
5832
5832
  const z = projMatrix.get(2, 2);
5833
- if (z > tolerance || z < -tolerance) result.z = 1 / z;
5833
+ if (z > tolerance || z < -1e-6) result.z = 1 / z;
5834
5834
  return result;
5835
5835
  }
5836
5836
  getSelected() {
@@ -5862,14 +5862,14 @@ class Viewer extends EventEmitter2 {
5862
5862
  if (!this.visualizeJs) return this;
5863
5863
  if (!this.client) return this;
5864
5864
  const abortController = new AbortController;
5865
- (_a = this._abortControllerForReferences) === null || _a === void 0 ? void 0 : _a.abort();
5865
+ (_a = this._abortControllerForReferences) === null || _a === undefined ? undefined : _a.abort();
5866
5866
  this._abortControllerForReferences = abortController;
5867
5867
  let references = [];
5868
5868
  await model.getReferences(abortController.signal).then((data => references = data.references)).catch((e => console.error("Cannot load model references.", e)));
5869
5869
  for (const file of references) {
5870
5870
  await this.client.downloadFile(file.id, undefined, abortController.signal).then((arrayBuffer => {
5871
5871
  var _a;
5872
- return (_a = this.visualizeJs) === null || _a === void 0 ? void 0 : _a.getViewer().addEmbeddedFile(file.name, new Uint8Array(arrayBuffer));
5872
+ return (_a = this.visualizeJs) === null || _a === undefined ? undefined : _a.getViewer().addEmbeddedFile(file.name, new Uint8Array(arrayBuffer));
5873
5873
  })).catch((e => console.error(`Cannot load reference file ${file.name}.`, e)));
5874
5874
  }
5875
5875
  return this;
@@ -6012,11 +6012,11 @@ class Viewer extends EventEmitter2 {
6012
6012
  }
6013
6013
  cancel() {
6014
6014
  var _a, _b, _c;
6015
- (_a = this._abortControllerForReferences) === null || _a === void 0 ? void 0 : _a.abort();
6015
+ (_a = this._abortControllerForReferences) === null || _a === undefined ? undefined : _a.abort();
6016
6016
  this._abortControllerForReferences = undefined;
6017
- (_b = this._abortController) === null || _b === void 0 ? void 0 : _b.abort();
6017
+ (_b = this._abortController) === null || _b === undefined ? undefined : _b.abort();
6018
6018
  this._abortController = undefined;
6019
- (_c = this._abortControllerForRequestMap) === null || _c === void 0 ? void 0 : _c.forEach((controller => controller.abort()));
6019
+ (_c = this._abortControllerForRequestMap) === null || _c === undefined ? undefined : _c.forEach((controller => controller.abort()));
6020
6020
  this._abortControllerForRequestMap = undefined;
6021
6021
  this.emitEvent({
6022
6022
  type: "cancel"
@@ -6074,7 +6074,7 @@ class Viewer extends EventEmitter2 {
6074
6074
  drawViewpoint(viewpoint) {
6075
6075
  var _a;
6076
6076
  if (!this.visualizeJs) return;
6077
- const draggerName = (_a = this._activeDragger) === null || _a === void 0 ? void 0 : _a.name;
6077
+ const draggerName = (_a = this._activeDragger) === null || _a === undefined ? undefined : _a.name;
6078
6078
  this.setActiveDragger();
6079
6079
  this.clearSlices();
6080
6080
  this.clearOverlay();
@@ -6167,7 +6167,7 @@ class Viewer extends EventEmitter2 {
6167
6167
  })));
6168
6168
  }
6169
6169
  setSelection(selection) {
6170
- this.setSelected(selection === null || selection === void 0 ? void 0 : selection.map((component => component.handle)));
6170
+ this.setSelected(selection === null || selection === undefined ? undefined : selection.map((component => component.handle)));
6171
6171
  }
6172
6172
  executeCommand(id, ...args) {
6173
6173
  return commands("VisualizeJS").executeCommand(id, this, ...args);