bruce-cesium 6.8.4 → 6.8.6

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.
@@ -10675,7 +10675,7 @@
10675
10675
  if ((_a = payload.renderQueue) === null || _a === void 0 ? void 0 : _a.length) {
10676
10676
  this.distributeForRender(payload.renderQueue);
10677
10677
  }
10678
- this.doEntityCheck(Object.keys(this.renderedEntities));
10678
+ this.ReRender({ entityIds: Object.keys(this.renderedEntities), force: true });
10679
10679
  this.viewer.scene.requestRender();
10680
10680
  }
10681
10681
  }
@@ -17092,7 +17092,7 @@
17092
17092
  if ((_a = payload.renderQueue) === null || _a === void 0 ? void 0 : _a.length) {
17093
17093
  this.distributeForRender(payload.renderQueue);
17094
17094
  }
17095
- this.doEntityCheck(Object.keys(this.renderedEntities));
17095
+ this.ReRender({ entityIds: Object.keys(this.renderedEntities), force: true });
17096
17096
  this.viewer.scene.requestRender();
17097
17097
  }
17098
17098
  }
@@ -18316,7 +18316,9 @@
18316
18316
  return null;
18317
18317
  }
18318
18318
  const accountId = ((_b = item.tileset) === null || _b === void 0 ? void 0 : _b.ClientAccountID) || "";
18319
- return `${accountId}:${tilesetId}`;
18319
+ // Styled <-> unstyled has no cheap revert path, force a reload instead.
18320
+ const applyStyles = Boolean(item.ApplyStyles);
18321
+ return `${accountId}:${tilesetId}:${applyStyles}`;
18320
18322
  }
18321
18323
  // Returns null (fall back to a normal Dispose()) if the tileset hasn't finished loading yet.
18322
18324
  PrepareHandoff() {
@@ -22085,7 +22087,7 @@
22085
22087
  * @returns
22086
22088
  */
22087
22089
  RenderItem(params) {
22088
- var _a, _b, _c, _d, _e, _f, _g, _h;
22090
+ var _a, _b, _c, _d, _e, _f, _g;
22089
22091
  if (this.viewer.isDestroyed()) {
22090
22092
  return null;
22091
22093
  }
@@ -22113,17 +22115,13 @@
22113
22115
  let create = true;
22114
22116
  // Item already exists so we'll check if we should re-create it.
22115
22117
  if (rItem) {
22116
- // This means we're updating a tag menu item.
22117
- // Tag menu items have alternative states based on bookmark settings.
22118
- // Eg: different tags that were enabled.
22118
+ // This means we're updating an entities menu item re-using the same id.
22119
+ // Eg: a bookmark swap that keeps the same item but changes tags, style, or zoom settings.
22119
22120
  if (rItem.type == BModels.MenuItem.EType.Entities && params.item.Type == BModels.MenuItem.EType.Entities) {
22120
- const eItem = rItem.item;
22121
- if ((_a = eItem === null || eItem === void 0 ? void 0 : eItem.BruceEntity) === null || _a === void 0 ? void 0 : _a.ExpandLayers) {
22122
- rItem.renderManager.Init({
22123
- item: params.item,
22124
- });
22125
- rItem.item = params.item;
22126
- }
22121
+ rItem.renderManager.Init({
22122
+ item: params.item,
22123
+ });
22124
+ rItem.item = params.item;
22127
22125
  create = false;
22128
22126
  }
22129
22127
  // This means we're updating a entities tileset menu item.
@@ -22197,7 +22195,7 @@
22197
22195
  const oRenderManager = rItem.renderManager;
22198
22196
  const oItem = params.item;
22199
22197
  if (oRenderManager && oItem) {
22200
- if (+oRenderManager.SourceId == +((_b = oItem.BruceEntity) === null || _b === void 0 ? void 0 : _b.SourceId) && oRenderManager.EntityTypeId == ((_c = oItem.BruceEntity) === null || _c === void 0 ? void 0 : _c["EntityType.ID"])) {
22198
+ if (+oRenderManager.SourceId == +((_a = oItem.BruceEntity) === null || _a === void 0 ? void 0 : _a.SourceId) && oRenderManager.EntityTypeId == ((_b = oItem.BruceEntity) === null || _b === void 0 ? void 0 : _b["EntityType.ID"])) {
22201
22199
  oRenderManager.Init({
22202
22200
  item: oItem
22203
22201
  });
@@ -22212,7 +22210,7 @@
22212
22210
  const eIdsItem = params.item;
22213
22211
  if (eIdsRenderManager && eIdsItem) {
22214
22212
  const eEntityIds = eIdsRenderManager.EntityIds;
22215
- const mEntityIds = (_d = eIdsItem.BruceEntity) === null || _d === void 0 ? void 0 : _d.EntityIds;
22213
+ const mEntityIds = (_c = eIdsItem.BruceEntity) === null || _c === void 0 ? void 0 : _c.EntityIds;
22216
22214
  const eEntityIdsStr = eEntityIds ? eEntityIds.join(",") : "";
22217
22215
  const mEntityIdsStr = mEntityIds ? mEntityIds.join(",") : "";
22218
22216
  if (eEntityIdsStr == mEntityIdsStr) {
@@ -22229,7 +22227,7 @@
22229
22227
  }
22230
22228
  if (create) {
22231
22229
  try {
22232
- (_e = rItem.renderManager) === null || _e === void 0 ? void 0 : _e.Dispose();
22230
+ (_d = rItem.renderManager) === null || _d === void 0 ? void 0 : _d.Dispose();
22233
22231
  }
22234
22232
  catch (e) {
22235
22233
  console.error(e);
@@ -22240,7 +22238,7 @@
22240
22238
  if (create) {
22241
22239
  if (!rItem) {
22242
22240
  rItem = {
22243
- id: (_f = params.item.id) !== null && _f !== void 0 ? _f : BModels.ObjectUtils.UId(),
22241
+ id: (_e = params.item.id) !== null && _e !== void 0 ? _e : BModels.ObjectUtils.UId(),
22244
22242
  childIds: [],
22245
22243
  item: params.item,
22246
22244
  renderManager: null,
@@ -22448,8 +22446,8 @@
22448
22446
  rItem.childIds.push(childId);
22449
22447
  }
22450
22448
  }
22451
- if (rItem.renderManager && !((_g = rItem.renderManager) === null || _g === void 0 ? void 0 : _g.Disposed)) {
22452
- (_h = this.onUpdate) === null || _h === void 0 ? void 0 : _h.Trigger({ isEnabling: true, itemId: rItem.id });
22449
+ if (rItem.renderManager && !((_f = rItem.renderManager) === null || _f === void 0 ? void 0 : _f.Disposed)) {
22450
+ (_g = this.onUpdate) === null || _g === void 0 ? void 0 : _g.Trigger({ isEnabling: true, itemId: rItem.id });
22453
22451
  }
22454
22452
  return rItem.id;
22455
22453
  }
@@ -37446,7 +37444,7 @@
37446
37444
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
37447
37445
  })(exports.StyleUtils || (exports.StyleUtils = {}));
37448
37446
 
37449
- const VERSION = "6.8.4";
37447
+ const VERSION = "6.8.6";
37450
37448
  /**
37451
37449
  * Updates the environment instance used by bruce-cesium to one specified.
37452
37450
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.