bruce-cesium 6.8.0 → 6.8.1

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.
@@ -14315,17 +14315,21 @@
14315
14315
  }
14316
14316
  }
14317
14317
  // Two items resolving to the same key are eligible to hand off, regardless of styling.
14318
+ // Model-space vs. geospatial, and historic vs. live, position the tileset via entirely
14319
+ // different code paths (baked in once at Init() time), so either changing must never
14320
+ // match an existing key and must instead force a real reload.
14318
14321
  get HandoffKey() {
14319
- return Manager.GetHandoffKey(this.item);
14322
+ return Manager.GetHandoffKey(this.item, this.modelSpace);
14320
14323
  }
14321
- static GetHandoffKey(item) {
14322
- var _a, _b;
14324
+ static GetHandoffKey(item, modelSpace) {
14325
+ var _a, _b, _c;
14323
14326
  const tilesetId = (_a = item === null || item === void 0 ? void 0 : item.tileset) === null || _a === void 0 ? void 0 : _a.TilesetID;
14324
14327
  if (!tilesetId) {
14325
14328
  return null;
14326
14329
  }
14327
14330
  const accountId = ((_b = item.tileset) === null || _b === void 0 ? void 0 : _b.ClientAccountID) || "";
14328
- return `${accountId}:${tilesetId}`;
14331
+ const historic = Boolean((_c = item.BruceEntity) === null || _c === void 0 ? void 0 : _c.historic);
14332
+ return `${accountId}:${tilesetId}:${Boolean(modelSpace)}:${historic}`;
14329
14333
  }
14330
14334
  // Returns null (fall back to a normal Dispose()) if the tileset hasn't finished loading yet.
14331
14335
  PrepareHandoff() {
@@ -22051,7 +22055,7 @@
22051
22055
  console.error("Menu item type is not implemented.", params.item.Type);
22052
22056
  }
22053
22057
  if (rItem.renderManager && !rItem.renderManager.Disposed) {
22054
- const handoffPayload = this.tryClaimHandoffPayload(params.item, rItem.renderManager);
22058
+ const handoffPayload = this.tryClaimHandoffPayload(params.item, rItem.renderManager, params.modelSpace);
22055
22059
  try {
22056
22060
  if (handoffPayload) {
22057
22061
  rItem.renderManager.AdoptHandoff(handoffPayload);
@@ -22128,9 +22132,9 @@
22128
22132
  return Boolean(renderManager) && typeof renderManager.PrepareHandoff === "function";
22129
22133
  }
22130
22134
  // Resolves the hand-off key a menu item's data would have.
22131
- computeHandoffKey(item) {
22135
+ computeHandoffKey(item, modelSpace) {
22132
22136
  if (item.Type === BModels.MenuItem.EType.CadTileset) {
22133
- return exports.TilesetCadRenderManager.Manager.GetHandoffKey(item);
22137
+ return exports.TilesetCadRenderManager.Manager.GetHandoffKey(item, modelSpace);
22134
22138
  }
22135
22139
  if (item.Type === BModels.MenuItem.EType.EntityTileset) {
22136
22140
  return exports.TilesetEntitiesRenderManager.Manager.GetHandoffKey(item);
@@ -22139,11 +22143,11 @@
22139
22143
  }
22140
22144
  // Claims a pooled manager for the same resource, if one exists and both sides opt in.
22141
22145
  // Returns null (meaning: construct normally via Init()) otherwise.
22142
- tryClaimHandoffPayload(item, newManager) {
22146
+ tryClaimHandoffPayload(item, newManager, modelSpace) {
22143
22147
  if (typeof newManager.AdoptHandoff !== "function") {
22144
22148
  return null;
22145
22149
  }
22146
- const key = this.computeHandoffKey(item);
22150
+ const key = this.computeHandoffKey(item, modelSpace);
22147
22151
  if (!key) {
22148
22152
  return null;
22149
22153
  }
@@ -37060,7 +37064,7 @@
37060
37064
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
37061
37065
  })(exports.StyleUtils || (exports.StyleUtils = {}));
37062
37066
 
37063
- const VERSION = "6.8.0";
37067
+ const VERSION = "6.8.1";
37064
37068
  /**
37065
37069
  * Updates the environment instance used by bruce-cesium to one specified.
37066
37070
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.