bruce-cesium 5.8.5 → 5.8.7

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.
@@ -4495,6 +4495,21 @@
4495
4495
  EntityUtils.GetOpacity = GetOpacity;
4496
4496
  async function FlyTo(params) {
4497
4497
  var _a, _b;
4498
+ let { entityIds, entities, tileset } = params;
4499
+ if (!entityIds && !entities && !tileset) {
4500
+ return false;
4501
+ }
4502
+ let entityLookup = new Map();
4503
+ if (!entityIds && entities) {
4504
+ entityIds = entities.map(x => x.Bruce.ID);
4505
+ }
4506
+ if (entities) {
4507
+ for (const entity of entities) {
4508
+ if (entity && entity.Bruce && entity.Bruce.ID) {
4509
+ entityLookup.set(entity.Bruce.ID, entity);
4510
+ }
4511
+ }
4512
+ }
4498
4513
  const is2d = exports.ViewUtils.Get2dStatus({
4499
4514
  viewer: params.viewer
4500
4515
  });
@@ -4503,8 +4518,9 @@
4503
4518
  createIfMissing: true
4504
4519
  });
4505
4520
  const location = await EntityUtils.GetLocation({
4506
- samples: params.entityIds.map((id) => ({
4521
+ samples: entityIds.map((id) => ({
4507
4522
  entityId: id,
4523
+ entity: entityLookup.get(id),
4508
4524
  returnHeightRef: Cesium.HeightReference.NONE,
4509
4525
  heightRef: Cesium.HeightReference.RELATIVE_TO_GROUND
4510
4526
  })),
@@ -4656,8 +4672,8 @@
4656
4672
  });
4657
4673
  return true;
4658
4674
  }
4659
- if (params.tileset && !params.tileset.isDestroyed() && params.tileset["ready"] != false && params.tileset.boundingSphere) {
4660
- params.viewer.zoomTo(params.tileset, new Cesium.HeadingPitchRange(0.0, -0.5, params.tileset.boundingSphere.radius / 4.0));
4675
+ if (tileset && !tileset.isDestroyed() && tileset["ready"] != false && tileset.boundingSphere) {
4676
+ params.viewer.zoomTo(tileset, new Cesium.HeadingPitchRange(0.0, -0.5, tileset.boundingSphere.radius / 4.0));
4661
4677
  return true;
4662
4678
  }
4663
4679
  return false;
@@ -12241,41 +12257,6 @@
12241
12257
  }
12242
12258
  return map;
12243
12259
  }
12244
- /**
12245
- * Gets hierarchy information for a given entity from any render manager.
12246
- * This is a utility method to get parent/child relationships.
12247
- * @param entityId The entity ID to get hierarchy info for
12248
- * @param menuItemId The menu item ID (optional)
12249
- * @returns Hierarchy information or null if not found
12250
- */
12251
- getHierarchyInfo(entityId, menuItemId) {
12252
- // Try to find the render manager for this entity
12253
- const rego = this.GetRego({ entityId, menuItemId });
12254
- if (!rego) {
12255
- return null;
12256
- }
12257
- // Check if it's a CAD tileset
12258
- if (rego.tilesetType === "CAD") {
12259
- // This would need to be implemented in the CAD render manager
12260
- // For now, return basic info
12261
- return {
12262
- parentId: undefined,
12263
- children: [],
12264
- path: [entityId]
12265
- };
12266
- }
12267
- // Check if it's an Assembly
12268
- if (rego.menuItemType === BModels.MenuItem.EType.Assembly) {
12269
- // This would need to be implemented in the Assembly render manager
12270
- // For now, return basic info
12271
- return {
12272
- parentId: undefined,
12273
- children: [],
12274
- path: [entityId]
12275
- };
12276
- }
12277
- return null;
12278
- }
12279
12260
  }
12280
12261
  VisualsRegister.Register = Register;
12281
12262
  })(exports.VisualsRegister || (exports.VisualsRegister = {}));
@@ -18344,6 +18325,7 @@
18344
18325
  rego.entityId = meta.entityId;
18345
18326
  rego.entityTypeId = meta.typeId;
18346
18327
  rego.name = meta.name;
18328
+ rego.parentId = meta.parentId;
18347
18329
  }
18348
18330
  }
18349
18331
  }
@@ -22290,7 +22272,7 @@
22290
22272
  this.renderPriority = 1;
22291
22273
  }
22292
22274
  (async () => {
22293
- var _a;
22275
+ var _a, _b, _c;
22294
22276
  if (this.disposed) {
22295
22277
  return;
22296
22278
  }
@@ -22377,7 +22359,8 @@
22377
22359
  accountId: this.getters.GetAccountId(),
22378
22360
  entityTypeId: entity.Bruce["EntityType.ID"],
22379
22361
  name: entity.Bruce.Name,
22380
- rootId: rootId
22362
+ rootId: rootId,
22363
+ parentId: (_c = (_b = this.hierarchyNodeByEntityId) === null || _b === void 0 ? void 0 : _b[entity.Bruce.ID]) === null || _c === void 0 ? void 0 : _c.parentId
22381
22364
  },
22382
22365
  requestRender: false
22383
22366
  });
@@ -32791,7 +32774,7 @@
32791
32774
  }
32792
32775
  }
32793
32776
 
32794
- const VERSION = "5.8.5";
32777
+ const VERSION = "5.8.7";
32795
32778
 
32796
32779
  exports.VERSION = VERSION;
32797
32780
  exports.isOutlineChanged = isOutlineChanged;