@inweb/viewer-visualize 27.5.0 → 27.6.0

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.
@@ -159,8 +159,7 @@
159
159
  this.abortController = new AbortController();
160
160
  }
161
161
  dispose() {
162
- this.abortController.abort();
163
- this.abortController = undefined;
162
+ this.cancel();
164
163
  }
165
164
  isSupport(file, format) {
166
165
  return false;
@@ -179,10 +178,10 @@
179
178
  extractFileName(file) {
180
179
  const regex = /[^/\\?#:]+(?=\?|#|$)/;
181
180
  if (typeof file === "string")
182
- return (file.match(regex) || [])[0];
181
+ return (file.match(regex) || [])[0] || "";
183
182
  else if (file instanceof globalThis.File)
184
- return (file.name.match(regex) || [])[0];
185
- return undefined;
183
+ return (file.name.match(regex) || [])[0] || "";
184
+ return "";
186
185
  }
187
186
  }
188
187
  class Loaders {
@@ -302,23 +301,36 @@
302
301
  }
303
302
  }
304
303
  resetToDefaults(fields) {
304
+ const defaults = Options.defaults();
305
305
  if (fields !== undefined) {
306
- const defaults = Options.defaults();
307
- const resetData = fields.reduce((acc, field) => {
308
- acc[field] = defaults[field];
309
- return acc;
310
- }, {});
311
- this.data = { ...this.data, ...resetData };
306
+ const resetData = {};
307
+ for (const field of fields) {
308
+ if (field in defaults)
309
+ resetData[field] = defaults[field];
310
+ }
311
+ this.data = resetData;
312
312
  }
313
313
  else {
314
- this.data = { ...this.data, ...Options.defaults() };
314
+ this.data = defaults;
315
+ }
316
+ }
317
+ setProperty(key, value = Options.defaults()[key]) {
318
+ if (this._data[key] !== value) {
319
+ this._data[key] = value;
320
+ this.change();
315
321
  }
316
322
  }
317
323
  get data() {
318
324
  return this._data;
319
325
  }
320
326
  set data(value) {
321
- this._data = { ...Options.defaults(), ...this._data, ...value };
327
+ const defaults = Options.defaults();
328
+ const merged = { ...defaults, ...this._data, ...value };
329
+ for (const key of Object.keys(defaults)) {
330
+ if (merged[key] === undefined)
331
+ merged[key] = defaults[key];
332
+ }
333
+ this._data = merged;
322
334
  if (this._data.enablePartialMode) {
323
335
  this._data.enableStreamingMode = true;
324
336
  this._data.sceneGraph = false;
@@ -335,84 +347,74 @@
335
347
  return this._data.showWCS;
336
348
  }
337
349
  set showWCS(value) {
338
- this._data.showWCS = value;
339
- this.change();
350
+ this.setProperty("showWCS", value);
340
351
  }
341
352
  get cameraAnimation() {
342
353
  return this._data.cameraAnimation;
343
354
  }
344
355
  set cameraAnimation(value) {
345
- this._data.cameraAnimation = value;
346
- this.change();
356
+ this.setProperty("cameraAnimation", value);
347
357
  }
348
358
  get antialiasing() {
349
359
  return this._data.antialiasing;
350
360
  }
351
361
  set antialiasing(value) {
352
- this._data.antialiasing = value;
353
- this.change();
362
+ this.setProperty("antialiasing", value);
354
363
  }
355
364
  get groundShadow() {
356
365
  return this._data.groundShadow;
357
366
  }
358
367
  set groundShadow(value) {
359
- this._data.groundShadow = value;
360
- this.change();
368
+ this.setProperty("groundShadow", value);
361
369
  }
362
370
  get shadows() {
363
371
  return this._data.shadows;
364
372
  }
365
373
  set shadows(value) {
366
- this._data.shadows = value;
367
- this.change();
374
+ this.setProperty("shadows", value);
368
375
  }
369
376
  get cameraAxisXSpeed() {
370
377
  return this._data.cameraAxisXSpeed;
371
378
  }
372
379
  set cameraAxisXSpeed(value) {
373
- this._data.cameraAxisXSpeed = value;
374
- this.change();
380
+ this.setProperty("cameraAxisXSpeed", value);
375
381
  }
376
382
  get cameraAxisYSpeed() {
377
383
  return this._data.cameraAxisYSpeed;
378
384
  }
379
385
  set cameraAxisYSpeed(value) {
380
- this.cameraAxisYSpeed = value;
381
- this.change();
386
+ this.setProperty("cameraAxisYSpeed", value);
382
387
  }
383
388
  get ambientOcclusion() {
384
389
  return this._data.ambientOcclusion;
385
390
  }
386
391
  set ambientOcclusion(value) {
387
- this._data.ambientOcclusion = value;
388
- this.change();
392
+ this.setProperty("ambientOcclusion", value);
389
393
  }
390
394
  get enableStreamingMode() {
391
395
  return this._data.enableStreamingMode;
392
396
  }
393
397
  set enableStreamingMode(value) {
394
- this._data.enableStreamingMode = value;
395
- if (!value)
396
- this._data.enablePartialMode = false;
397
- this.change();
398
+ this.setProperty("enableStreamingMode", value);
399
+ if (!value) {
400
+ this.setProperty("enablePartialMode", false);
401
+ }
398
402
  }
399
403
  get enablePartialMode() {
400
404
  return this._data.enablePartialMode;
401
405
  }
402
406
  set enablePartialMode(value) {
403
- this._data.enablePartialMode = value;
407
+ this.setProperty("enablePartialMode", value);
404
408
  if (value) {
405
- this._data.enableStreamingMode = true;
406
- this._data.sceneGraph = false;
409
+ this.setProperty("enableStreamingMode", true);
410
+ this.setProperty("sceneGraph", false);
407
411
  }
408
- this.change();
409
412
  }
410
413
  get memoryLimit() {
411
414
  return this._data.memoryLimit;
412
415
  }
413
416
  set memoryLimit(value) {
414
- this._data.memoryLimit = value;
415
- this.change();
417
+ this.setProperty("memoryLimit", value);
416
418
  }
417
419
  get cuttingPlaneFillColor() {
418
420
  console.warn("Options.cuttingPlaneFillColor has been deprecated since 27.5 and will be removed in a future release, use sectionFillColor instead");
@@ -424,189 +426,176 @@
424
426
  }
425
427
  set cuttingPlaneFillColor(value) {
426
428
  console.warn("Options.cuttingPlaneFillColor has been deprecated since 27.5 and will be removed in a future release, use sectionFillColor instead");
427
- this._data.sectionFillColor = {
429
+ this.setProperty("sectionFillColor", {
428
430
  r: value.red,
429
431
  g: value.green,
430
432
  b: value.blue,
431
- };
432
- this.change();
433
+ });
433
434
  }
434
435
  get enableSectionFill() {
435
436
  return this._data.enableSectionFill;
436
437
  }
437
438
  set enableSectionFill(value) {
438
- this._data.enableSectionFill = value;
439
- this.change();
439
+ this.setProperty("enableSectionFill", value);
440
440
  }
441
441
  get sectionFillColor() {
442
442
  return this._data.sectionFillColor;
443
443
  }
444
444
  set sectionFillColor(value) {
445
- this._data.sectionFillColor = value;
446
- this.change();
445
+ this.setProperty("sectionFillColor", value);
447
446
  }
448
447
  get sectionUseObjectColor() {
449
448
  return this._data.sectionUseObjectColor;
450
449
  }
451
450
  set sectionUseObjectColor(value) {
452
- this._data.sectionUseObjectColor = value;
453
- this.change();
451
+ this.setProperty("sectionUseObjectColor", value);
454
452
  }
455
453
  get enableSectionHatch() {
456
454
  return this._data.enableSectionHatch;
457
455
  }
458
456
  set enableSectionHatch(value) {
459
- this._data.enableSectionHatch = value;
460
- this.change();
457
+ this.setProperty("enableSectionHatch", value);
461
458
  }
462
459
  get sectionHatchColor() {
463
460
  return this._data.sectionHatchColor;
464
461
  }
465
462
  set sectionHatchColor(value) {
466
- this._data.sectionHatchColor = value;
467
- this.change();
463
+ this.setProperty("sectionHatchColor", value);
468
464
  }
469
465
  get sectionHatchScale() {
470
466
  return this._data.sectionHatchScale;
471
467
  }
472
468
  set sectionHatchScale(value) {
473
- this._data.sectionHatchScale = value;
474
- this.change();
469
+ this.setProperty("sectionHatchScale", value);
475
470
  }
476
471
  get enableSectionOutline() {
477
472
  return this._data.enableSectionOutline;
478
473
  }
479
474
  set enableSectionOutline(value) {
480
- this._data.enableSectionOutline = value;
481
- this.change();
475
+ this.setProperty("enableSectionOutline", value);
482
476
  }
483
477
  get sectionOutlineColor() {
484
478
  return this._data.sectionOutlineColor;
485
479
  }
486
480
  set sectionOutlineColor(value) {
487
- this._data.sectionOutlineColor = value;
488
- this.change();
481
+ this.setProperty("sectionOutlineColor", value);
489
482
  }
490
483
  get sectionOutlineWidth() {
491
484
  return this._data.sectionOutlineWidth;
492
485
  }
493
486
  set sectionOutlineWidth(value) {
494
- this._data.sectionOutlineWidth = value;
495
- this.change();
487
+ this.setProperty("sectionOutlineWidth", value);
496
488
  }
497
489
  get edgesColor() {
498
490
  return this._data.edgesColor;
499
491
  }
500
492
  set edgesColor(value) {
501
- this._data.edgesColor = value;
502
- this.change();
493
+ this.setProperty("edgesColor", value);
503
494
  }
504
495
  get facesColor() {
505
496
  return this._data.facesColor;
506
497
  }
507
498
  set facesColor(value) {
508
- this._data.facesColor = value;
509
- this.change();
499
+ this.setProperty("facesColor", value);
510
500
  }
511
501
  get edgesVisibility() {
512
502
  return this._data.edgesVisibility;
513
503
  }
514
504
  set edgesVisibility(value) {
515
- this._data.edgesVisibility = value;
516
- this.change();
505
+ this.setProperty("edgesVisibility", value);
517
506
  }
518
507
  get edgesOverlap() {
519
508
  return this._data.edgesOverlap;
520
509
  }
521
510
  set edgesOverlap(value) {
522
- this._data.edgesOverlap = value;
523
- this.change();
511
+ this.setProperty("edgesOverlap", value);
524
512
  }
525
513
  get facesOverlap() {
526
514
  return this._data.facesOverlap;
527
515
  }
528
516
  set facesOverlap(value) {
529
- this._data.facesOverlap = value;
530
- this.change();
517
+ this.setProperty("facesOverlap", value);
531
518
  }
532
519
  get facesTransparancy() {
533
520
  return this._data.facesTransparancy;
534
521
  }
535
522
  set facesTransparancy(value) {
536
- this._data.facesTransparancy = value;
537
- this.change();
523
+ this.setProperty("facesTransparancy", value);
538
524
  }
539
525
  get enableCustomHighlight() {
540
526
  return this._data.enableCustomHighlight;
541
527
  }
542
528
  set enableCustomHighlight(value) {
543
- this._data.enableCustomHighlight = value;
544
- this.change();
529
+ this.setProperty("enableCustomHighlight", value);
545
530
  }
546
531
  get sceneGraph() {
547
532
  return this._data.sceneGraph;
548
533
  }
549
534
  set sceneGraph(value) {
550
- this._data.sceneGraph = value;
551
- if (value)
552
- this._data.enablePartialMode = false;
553
- this.change();
535
+ this.setProperty("sceneGraph", value);
536
+ if (value) {
537
+ this.setProperty("enablePartialMode", false);
538
+ }
554
539
  }
555
540
  get edgeModel() {
556
541
  return Boolean(this._data.edgeModel);
557
542
  }
558
543
  set edgeModel(value) {
559
- this._data.edgeModel = Boolean(value);
560
- this.change();
544
+ this.setProperty("edgeModel", value);
561
545
  }
562
546
  get reverseZoomWheel() {
563
547
  return this._data.reverseZoomWheel;
564
548
  }
565
549
  set reverseZoomWheel(value) {
566
- this._data.reverseZoomWheel = !!value;
567
- this.change();
550
+ this.setProperty("reverseZoomWheel", value);
568
551
  }
569
552
  get enableZoomWheel() {
570
553
  return this._data.enableZoomWheel;
571
554
  }
572
555
  set enableZoomWheel(value) {
573
- this._data.enableZoomWheel = !!value;
574
- this.change();
556
+ this.setProperty("enableZoomWheel", value);
575
557
  }
576
558
  get enableGestures() {
577
559
  return this._data.enableGestures;
578
560
  }
579
561
  set enableGestures(value) {
580
- this._data.enableGestures = !!value;
581
- this.change();
562
+ this.setProperty("enableGestures", value);
582
563
  }
583
564
  get geometryType() {
584
565
  return this._data.geometryType;
585
566
  }
586
567
  set geometryType(value) {
587
- this._data.geometryType = value;
588
- this.change();
568
+ this.setProperty("geometryType", value);
589
569
  }
590
570
  get rulerUnit() {
591
571
  return this._data.rulerUnit;
592
572
  }
593
573
  set rulerUnit(value) {
594
- this._data.rulerUnit = value;
595
- this.change();
574
+ this.setProperty("rulerUnit", value);
596
575
  }
597
576
  get rulerPrecision() {
598
577
  return this._data.rulerPrecision;
599
578
  }
600
579
  set rulerPrecision(value) {
601
- this._data.rulerPrecision = value;
602
- this.change();
580
+ this.setProperty("rulerPrecision", value);
603
581
  }
604
582
  get cameraMode() {
605
583
  return this._data.cameraMode || "perspective";
606
584
  }
607
585
  set cameraMode(value) {
608
- this._data.cameraMode = value;
609
- this.change();
586
+ this.setProperty("cameraMode", value);
587
+ }
588
+ get snapshotMimeType() {
589
+ return this._data.snapshotMimeType;
590
+ }
591
+ set snapshotMimeType(value) {
592
+ this.setProperty("snapshotMimeType", value);
593
+ }
594
+ get snapshotQuality() {
595
+ return this._data.snapshotQuality;
596
+ }
597
+ set snapshotQuality(value) {
598
+ this.setProperty("snapshotQuality", value);
610
599
  }
611
600
  }
612
601
  const CanvasEvents = [
@@ -770,6 +759,7 @@
770
759
  class OdBaseDragger extends OdaGeAction {
771
760
  constructor(subject) {
772
761
  super(subject.visualizeJs);
762
+ this.name = "";
773
763
  this.beginInteractivity = () => {
774
764
  const viewer = this.getViewer();
775
765
  const view = viewer.activeView;
@@ -796,6 +786,8 @@
796
786
  this.needInputText = false;
797
787
  this.mouseDownPosition = { x: 0, y: 0 };
798
788
  this.autoSelect = false;
789
+ this.isDragging = false;
790
+ this.press = false;
799
791
  this.pointerdown = this.pointerdown.bind(this);
800
792
  this.pointerup = this.pointerup.bind(this);
801
793
  this.pointercancel = this.pointercancel.bind(this);
@@ -2981,16 +2973,16 @@
2981
2973
  constructor(subject) {
2982
2974
  super(subject);
2983
2975
  this.press = false;
2976
+ this.drawPoints = [];
2984
2977
  }
2985
2978
  dispose() {
2986
2979
  super.dispose();
2987
2980
  this.end();
2988
- this.points = null;
2989
- this.drawPoints = null;
2981
+ this.drawPoints.length = 0;
2990
2982
  }
2991
2983
  start(x, y) {
2992
2984
  const point = this.getViewer().screenToWorld(x, y);
2993
- this.drawPoints = [point[0], point[1], point[2]];
2985
+ this.drawPoints.push(point[0], point[1], point[2]);
2994
2986
  }
2995
2987
  drag(x, y) {
2996
2988
  if (this.isDragging) {
@@ -3002,7 +2994,7 @@
3002
2994
  end() {
3003
2995
  if (this.entity) {
3004
2996
  this.entity.delete();
3005
- this.drawPoints = null;
2997
+ this.drawPoints.length = 0;
3006
2998
  this.entity = null;
3007
2999
  }
3008
3000
  }
@@ -3698,7 +3690,6 @@
3698
3690
  }
3699
3691
  dispose() {
3700
3692
  this.mutationObserver.disconnect();
3701
- this.mutationObserver = undefined;
3702
3693
  }
3703
3694
  }
3704
3695
 
@@ -3724,7 +3715,6 @@
3724
3715
  }
3725
3716
  dispose() {
3726
3717
  this.zoomWheelDragger.dispose();
3727
- this.zoomWheelDragger = undefined;
3728
3718
  }
3729
3719
  }
3730
3720
 
@@ -3918,7 +3908,6 @@
3918
3908
  }
3919
3909
  dispose() {
3920
3910
  this.gestureManager.dispose();
3921
- this.gestureManager = undefined;
3922
3911
  }
3923
3912
  }
3924
3913
 
@@ -3981,6 +3970,9 @@
3981
3970
  components.registerComponent("ResetComponent", (viewer) => new ResetComponent(viewer));
3982
3971
 
3983
3972
  class ModelImpl {
3973
+ constructor() {
3974
+ this.id = "";
3975
+ }
3984
3976
  dispose() { }
3985
3977
  }
3986
3978
 
@@ -3988,7 +3980,6 @@
3988
3980
  constructor() {
3989
3981
  this.requestHeader = {};
3990
3982
  this.withCredentials = false;
3991
- this.abortSignal = undefined;
3992
3983
  }
3993
3984
  setRequestHeader(requestHeader) {
3994
3985
  this.requestHeader = requestHeader;
@@ -4010,12 +4001,15 @@
4010
4001
  .then((response) => {
4011
4002
  if (!response.ok)
4012
4003
  throw new Error(`Failed to fetch "${response.url}", status ${response.status}`);
4004
+ const body = response.body;
4005
+ if (!body)
4006
+ return response;
4013
4007
  const contentLength = response.headers.get("X-File-Size") || response.headers.get("Content-Length");
4014
4008
  const total = parseInt(contentLength || "", 10) || 0;
4015
4009
  const lengthComputable = total > 0;
4016
4010
  const stream = new ReadableStream({
4017
4011
  async start(controller) {
4018
- const reader = response.body.getReader();
4012
+ const reader = body.getReader();
4019
4013
  let loaded = 0;
4020
4014
  try {
4021
4015
  while (true) {
@@ -4044,7 +4038,7 @@
4044
4038
  const reader = new FileReader();
4045
4039
  reader.onload = () => resolve(reader.result);
4046
4040
  reader.onerror = () => reject(reader.error);
4047
- reader.onprogress = onProgress;
4041
+ reader.onprogress = onProgress || null;
4048
4042
  reader.readAsArrayBuffer(new Blob([file]));
4049
4043
  });
4050
4044
  }
@@ -4063,7 +4057,7 @@
4063
4057
  super();
4064
4058
  this.viewer = viewer;
4065
4059
  }
4066
- isSupport(file, format) {
4060
+ isSupport(file, format = "") {
4067
4061
  return ((typeof file === "string" || file instanceof globalThis.File || file instanceof ArrayBuffer) &&
4068
4062
  /vsf$/i.test(format));
4069
4063
  }
@@ -4158,7 +4152,7 @@
4158
4152
  super();
4159
4153
  this.viewer = viewer;
4160
4154
  }
4161
- isSupport(file, format) {
4155
+ isSupport(file, format = "") {
4162
4156
  return ((typeof file === "string" || file instanceof globalThis.File || file instanceof ArrayBuffer) &&
4163
4157
  /vsfx$/i.test(format));
4164
4158
  }
@@ -4518,7 +4512,7 @@
4518
4512
  const script = document.createElement("script");
4519
4513
  script.src = url;
4520
4514
  script.async = true;
4521
- script.crossOrigin = params.crossOrigin;
4515
+ script.crossOrigin = params.crossOrigin || null;
4522
4516
  script.onload = () => resolve(script);
4523
4517
  script.onerror = () => {
4524
4518
  script.remove();
@@ -17316,8 +17310,8 @@ js: import "konva/skia-backend";
17316
17310
  this.lineWidth = 4;
17317
17311
  this.lineType = "solid";
17318
17312
  this.fontSize = 34;
17319
- this.changeActiveDragger = (event) => {
17320
- const draggerName = event.data;
17313
+ this.changeActiveDragger = ({ data }) => {
17314
+ const draggerName = data || "";
17321
17315
  this._markupContainer.className = this._container.className
17322
17316
  .split(" ")
17323
17317
  .filter((x) => !x.startsWith("oda-cursor-"))
@@ -17378,19 +17372,19 @@ js: import "konva/skia-backend";
17378
17372
  this._resizeObserver = new ResizeObserver(this.resizeContainer);
17379
17373
  this._resizeObserver.observe(container);
17380
17374
  if (this._viewer) {
17381
- this._viewer.addEventListener("changeactivedragger", this.changeActiveDragger);
17382
- this._viewer.addEventListener("pan", this.pan);
17383
- this._viewer.addEventListener("zoomat", this.zoomAt);
17384
- this._viewer.addEventListener("changecameramode", this.changeCameraMode);
17375
+ this._viewer.on("changeactivedragger", this.changeActiveDragger);
17376
+ this._viewer.on("pan", this.pan);
17377
+ this._viewer.on("zoomat", this.zoomAt);
17378
+ this._viewer.on("changecameramode", this.changeCameraMode);
17385
17379
  }
17386
17380
  }
17387
17381
  dispose() {
17388
17382
  var _a, _b;
17389
17383
  if (this._viewer) {
17390
- this._viewer.removeEventListener("changecameramode", this.changeCameraMode);
17391
- this._viewer.removeEventListener("zoomat", this.zoomAt);
17392
- this._viewer.removeEventListener("pan", this.pan);
17393
- this._viewer.removeEventListener("changeactivedragger", this.changeActiveDragger);
17384
+ this._viewer.off("changecameramode", this.changeCameraMode);
17385
+ this._viewer.off("zoomat", this.zoomAt);
17386
+ this._viewer.off("pan", this.pan);
17387
+ this._viewer.off("changeactivedragger", this.changeActiveDragger);
17394
17388
  }
17395
17389
  (_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
17396
17390
  this._resizeObserver = undefined;
@@ -18153,6 +18147,7 @@ js: import "konva/skia-backend";
18153
18147
  constructor() {
18154
18148
  this._markupColor = { r: 255, g: 0, b: 0 };
18155
18149
  this.lineWidth = 4;
18150
+ this.lineType = "solid";
18156
18151
  this.fontSize = 34;
18157
18152
  }
18158
18153
  initialize(container, containerEvents, viewer, worldTransformer) {
@@ -18361,6 +18356,7 @@ js: import "konva/skia-backend";
18361
18356
  this.info = new Info();
18362
18357
  this.canvasEvents = CANVAS_EVENTS.slice();
18363
18358
  this.canvaseventlistener = (event) => this.emit(event);
18359
+ this._visualizeTimestamp = 0;
18364
18360
  this._activeDragger = null;
18365
18361
  this._components = [];
18366
18362
  this._renderNeeded = false;
@@ -18427,7 +18423,9 @@ js: import "konva/skia-backend";
18427
18423
  this.canvasEvents.forEach((x) => canvas.addEventListener(x, this.canvaseventlistener));
18428
18424
  this._markup.initialize(this.canvas, this.canvasEvents, this, this);
18429
18425
  for (const name of components.getComponents().keys()) {
18430
- this._components.push(components.createComponent(name, this));
18426
+ const component = components.createComponent(name, this);
18427
+ if (component)
18428
+ this._components.push(component);
18431
18429
  }
18432
18430
  this.syncOptions();
18433
18431
  this.syncOverlay();
@@ -18444,10 +18442,7 @@ js: import "konva/skia-backend";
18444
18442
  this.setActiveDragger();
18445
18443
  this._components.forEach((component) => component.dispose());
18446
18444
  this._components.length = 0;
18447
- if (this._markup) {
18448
- this._markup.dispose();
18449
- this._markup = undefined;
18450
- }
18445
+ this._markup.dispose();
18451
18446
  if (this.canvas) {
18452
18447
  this.canvasEvents.forEach((x) => this.canvas.removeEventListener(x, this.canvaseventlistener));
18453
18448
  this.canvas = undefined;
@@ -18455,7 +18450,7 @@ js: import "konva/skia-backend";
18455
18450
  if (this._viewer)
18456
18451
  this._viewer.clear();
18457
18452
  this._visualizeJs = undefined;
18458
- this._visualizeTimestamp = undefined;
18453
+ this._visualizeTimestamp = 0;
18459
18454
  this._viewer = undefined;
18460
18455
  return this;
18461
18456
  }
@@ -18832,7 +18827,7 @@ js: import "konva/skia-backend";
18832
18827
  }
18833
18828
  }
18834
18829
  getComponent(name) {
18835
- return this._components.find((component) => component.name === name);
18830
+ return this._components.find((component) => component.name === name) || null;
18836
18831
  }
18837
18832
  drawViewpoint(viewpoint) {
18838
18833
  var _a, _b;