@sequent-org/ifc-viewer 1.2.4-ci.51.0 → 1.2.4-ci.52.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.
- package/package.json +1 -1
- package/src/IfcViewer.js +16 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sequent-org/ifc-viewer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.2.4-ci.
|
|
4
|
+
"version": "1.2.4-ci.52.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "IFC 3D model viewer component for web applications - fully self-contained with local IFCLoader",
|
|
7
7
|
"main": "src/index.js",
|
package/src/IfcViewer.js
CHANGED
|
@@ -22,6 +22,7 @@ import { TdsModelLoader } from "./model-loading/loaders/TdsModelLoader.js";
|
|
|
22
22
|
import { StlModelLoader } from "./model-loading/loaders/StlModelLoader.js";
|
|
23
23
|
import { DaeModelLoader } from "./model-loading/loaders/DaeModelLoader.js";
|
|
24
24
|
import { ThreeDmModelLoader } from "./model-loading/loaders/ThreeDmModelLoader.js";
|
|
25
|
+
import { CardPlacementController } from "./ui/CardPlacementController.js";
|
|
25
26
|
import './style.css';
|
|
26
27
|
|
|
27
28
|
|
|
@@ -82,6 +83,7 @@ export class IfcViewer {
|
|
|
82
83
|
this.viewer = null;
|
|
83
84
|
this.ifcService = null;
|
|
84
85
|
this.ifcTreeView = null;
|
|
86
|
+
this.cardPlacement = null;
|
|
85
87
|
/** @type {ModelLoaderRegistry|null} */
|
|
86
88
|
this.modelLoaders = null;
|
|
87
89
|
this.isInitialized = false;
|
|
@@ -308,6 +310,11 @@ export class IfcViewer {
|
|
|
308
310
|
this.ifcService.dispose();
|
|
309
311
|
this.ifcService = null;
|
|
310
312
|
}
|
|
313
|
+
|
|
314
|
+
if (this.cardPlacement) {
|
|
315
|
+
try { this.cardPlacement.dispose(); } catch (_) {}
|
|
316
|
+
this.cardPlacement = null;
|
|
317
|
+
}
|
|
311
318
|
|
|
312
319
|
if (this.viewer) {
|
|
313
320
|
this.viewer.dispose();
|
|
@@ -508,6 +515,15 @@ export class IfcViewer {
|
|
|
508
515
|
|
|
509
516
|
this.viewer = new Viewer(this.elements.viewerContainer);
|
|
510
517
|
this.viewer.init();
|
|
518
|
+
|
|
519
|
+
// В пакете включаем UI "карточек" по умолчанию:
|
|
520
|
+
// кнопка "+ Добавить карточку" + режим постановки меток + сохранение/восстановление состояния.
|
|
521
|
+
try {
|
|
522
|
+
this.cardPlacement = new CardPlacementController({ viewer: this.viewer, container: this.elements.viewerContainer, logger: console });
|
|
523
|
+
} catch (e) {
|
|
524
|
+
console.warn('IfcViewer: CardPlacementController init failed', e);
|
|
525
|
+
this.cardPlacement = null;
|
|
526
|
+
}
|
|
511
527
|
}
|
|
512
528
|
|
|
513
529
|
/**
|