@2112-lab/central-plant 0.3.6 → 0.3.8
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/bundle/index.js +14 -1
- package/dist/cjs/src/core/centralPlant.js +1 -1
- package/dist/cjs/src/core/centralPlantInternals.js +8 -0
- package/dist/cjs/src/utils/sceneClearingUtility.js +5 -0
- package/dist/esm/src/core/centralPlant.js +1 -1
- package/dist/esm/src/core/centralPlantInternals.js +8 -0
- package/dist/esm/src/utils/sceneClearingUtility.js +5 -0
- package/package.json +1 -1
package/dist/bundle/index.js
CHANGED
|
@@ -30388,6 +30388,11 @@ var SceneClearingUtility = /*#__PURE__*/function () {
|
|
|
30388
30388
|
this.sceneViewer.currentSceneData.connections = [];
|
|
30389
30389
|
}
|
|
30390
30390
|
|
|
30391
|
+
// Clear the JSON data mirror so getAvailableConnections() returns nothing
|
|
30392
|
+
if (this.sceneViewer.currentSceneData && this.sceneViewer.currentSceneData.scene) {
|
|
30393
|
+
this.sceneViewer.currentSceneData.scene.children = [];
|
|
30394
|
+
}
|
|
30395
|
+
|
|
30391
30396
|
// Reset component counter for CentralPlant
|
|
30392
30397
|
if (this.sceneViewer.centralPlant && this.sceneViewer.centralPlant.componentCounter !== undefined) {
|
|
30393
30398
|
this.sceneViewer.centralPlant.componentCounter = 0;
|
|
@@ -37756,6 +37761,14 @@ var CentralPlantInternals = /*#__PURE__*/function () {
|
|
|
37756
37761
|
});
|
|
37757
37762
|
console.log("\uD83D\uDCE1 Emitted 'component-removed' event for ".concat(componentId));
|
|
37758
37763
|
}
|
|
37764
|
+
|
|
37765
|
+
// Auto-update paths if enabled (mirrors behaviour of transformOperationsManager)
|
|
37766
|
+
if (this.centralPlant.sceneViewer.shouldUpdatePaths) {
|
|
37767
|
+
if (typeof this.centralPlant.sceneViewer.updatePaths === 'function') {
|
|
37768
|
+
console.log('🔄 deleteComponent(): Auto-updating paths after delete...');
|
|
37769
|
+
this.centralPlant.sceneViewer.updatePaths();
|
|
37770
|
+
}
|
|
37771
|
+
}
|
|
37759
37772
|
console.log("\u2705 deleteComponent(): Component ".concat(componentId, " deleted successfully"));
|
|
37760
37773
|
return true;
|
|
37761
37774
|
} else {
|
|
@@ -37816,7 +37829,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
37816
37829
|
* Initialize the CentralPlant manager
|
|
37817
37830
|
*
|
|
37818
37831
|
* @constructor
|
|
37819
|
-
* @version 0.3.
|
|
37832
|
+
* @version 0.3.8
|
|
37820
37833
|
* @updated 2025-10-22
|
|
37821
37834
|
*
|
|
37822
37835
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -35,7 +35,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
35
35
|
* Initialize the CentralPlant manager
|
|
36
36
|
*
|
|
37
37
|
* @constructor
|
|
38
|
-
* @version 0.3.
|
|
38
|
+
* @version 0.3.8
|
|
39
39
|
* @updated 2025-10-22
|
|
40
40
|
*
|
|
41
41
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -1268,6 +1268,14 @@ var CentralPlantInternals = /*#__PURE__*/function () {
|
|
|
1268
1268
|
});
|
|
1269
1269
|
console.log("\uD83D\uDCE1 Emitted 'component-removed' event for ".concat(componentId));
|
|
1270
1270
|
}
|
|
1271
|
+
|
|
1272
|
+
// Auto-update paths if enabled (mirrors behaviour of transformOperationsManager)
|
|
1273
|
+
if (this.centralPlant.sceneViewer.shouldUpdatePaths) {
|
|
1274
|
+
if (typeof this.centralPlant.sceneViewer.updatePaths === 'function') {
|
|
1275
|
+
console.log('🔄 deleteComponent(): Auto-updating paths after delete...');
|
|
1276
|
+
this.centralPlant.sceneViewer.updatePaths();
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1271
1279
|
console.log("\u2705 deleteComponent(): Component ".concat(componentId, " deleted successfully"));
|
|
1272
1280
|
return true;
|
|
1273
1281
|
} else {
|
|
@@ -480,6 +480,11 @@ var SceneClearingUtility = /*#__PURE__*/function () {
|
|
|
480
480
|
this.sceneViewer.currentSceneData.connections = [];
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
+
// Clear the JSON data mirror so getAvailableConnections() returns nothing
|
|
484
|
+
if (this.sceneViewer.currentSceneData && this.sceneViewer.currentSceneData.scene) {
|
|
485
|
+
this.sceneViewer.currentSceneData.scene.children = [];
|
|
486
|
+
}
|
|
487
|
+
|
|
483
488
|
// Reset component counter for CentralPlant
|
|
484
489
|
if (this.sceneViewer.centralPlant && this.sceneViewer.centralPlant.componentCounter !== undefined) {
|
|
485
490
|
this.sceneViewer.centralPlant.componentCounter = 0;
|
|
@@ -31,7 +31,7 @@ var CentralPlant = /*#__PURE__*/function (_BaseDisposable) {
|
|
|
31
31
|
* Initialize the CentralPlant manager
|
|
32
32
|
*
|
|
33
33
|
* @constructor
|
|
34
|
-
* @version 0.3.
|
|
34
|
+
* @version 0.3.8
|
|
35
35
|
* @updated 2025-10-22
|
|
36
36
|
*
|
|
37
37
|
* @description Creates a new CentralPlant instance and initializes internal managers and utilities.
|
|
@@ -1244,6 +1244,14 @@ var CentralPlantInternals = /*#__PURE__*/function () {
|
|
|
1244
1244
|
});
|
|
1245
1245
|
console.log("\uD83D\uDCE1 Emitted 'component-removed' event for ".concat(componentId));
|
|
1246
1246
|
}
|
|
1247
|
+
|
|
1248
|
+
// Auto-update paths if enabled (mirrors behaviour of transformOperationsManager)
|
|
1249
|
+
if (this.centralPlant.sceneViewer.shouldUpdatePaths) {
|
|
1250
|
+
if (typeof this.centralPlant.sceneViewer.updatePaths === 'function') {
|
|
1251
|
+
console.log('🔄 deleteComponent(): Auto-updating paths after delete...');
|
|
1252
|
+
this.centralPlant.sceneViewer.updatePaths();
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1247
1255
|
console.log("\u2705 deleteComponent(): Component ".concat(componentId, " deleted successfully"));
|
|
1248
1256
|
return true;
|
|
1249
1257
|
} else {
|
|
@@ -476,6 +476,11 @@ var SceneClearingUtility = /*#__PURE__*/function () {
|
|
|
476
476
|
this.sceneViewer.currentSceneData.connections = [];
|
|
477
477
|
}
|
|
478
478
|
|
|
479
|
+
// Clear the JSON data mirror so getAvailableConnections() returns nothing
|
|
480
|
+
if (this.sceneViewer.currentSceneData && this.sceneViewer.currentSceneData.scene) {
|
|
481
|
+
this.sceneViewer.currentSceneData.scene.children = [];
|
|
482
|
+
}
|
|
483
|
+
|
|
479
484
|
// Reset component counter for CentralPlant
|
|
480
485
|
if (this.sceneViewer.centralPlant && this.sceneViewer.centralPlant.componentCounter !== undefined) {
|
|
481
486
|
this.sceneViewer.centralPlant.componentCounter = 0;
|