bruce-cesium 7.9.0 → 7.9.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.
@@ -11097,7 +11097,7 @@
11097
11097
  * If one exists then the action is ignored.
11098
11098
  */
11099
11099
  function Attach(params) {
11100
- var _a, _b, _c;
11100
+ var _a, _b, _c, _d;
11101
11101
  const { rego, viewer, pos3d, visualRegister, api, options, groupId } = params;
11102
11102
  if (!rego || !viewer) {
11103
11103
  return;
@@ -11108,8 +11108,8 @@
11108
11108
  return Attach({
11109
11109
  ...params,
11110
11110
  pos3d: undefined,
11111
- options: (_a = group === null || group === void 0 ? void 0 : group.options) !== null && _a !== void 0 ? _a : options,
11112
- groupId: (_b = group === null || group === void 0 ? void 0 : group.groupId) !== null && _b !== void 0 ? _b : groupId,
11111
+ options: group ? group.options : (_b = (_a = visualRegister.GetLabelDefaults) === null || _a === void 0 ? void 0 : _a.call(visualRegister)) !== null && _b !== void 0 ? _b : options,
11112
+ groupId: (_c = group === null || group === void 0 ? void 0 : group.groupId) !== null && _c !== void 0 ? _c : groupId,
11113
11113
  persistent: true
11114
11114
  });
11115
11115
  }
@@ -11119,7 +11119,7 @@
11119
11119
  if (rego[EntityLabel.ATTACH_KEY].Persistent && params.persistent !== true && !groupId) {
11120
11120
  return rego[EntityLabel.ATTACH_KEY];
11121
11121
  }
11122
- rego[EntityLabel.ATTACH_KEY].Persistent = (_c = params.persistent) !== null && _c !== void 0 ? _c : Boolean(groupId);
11122
+ rego[EntityLabel.ATTACH_KEY].Persistent = (_d = params.persistent) !== null && _d !== void 0 ? _d : Boolean(groupId);
11123
11123
  rego[EntityLabel.ATTACH_KEY].Configure(options, groupId);
11124
11124
  return rego[EntityLabel.ATTACH_KEY];
11125
11125
  }
@@ -13830,7 +13830,7 @@
13830
13830
  viewer,
13831
13831
  api: (_b = register.ApiGetters) === null || _b === void 0 ? void 0 : _b.GetBruceApi(),
13832
13832
  visualRegister: register,
13833
- options: labelGroup === null || labelGroup === void 0 ? void 0 : labelGroup.options,
13833
+ options: labelGroup ? labelGroup.options : register.GetLabelDefaults(),
13834
13834
  groupId: labelGroup === null || labelGroup === void 0 ? void 0 : labelGroup.groupId,
13835
13835
  persistent: true
13836
13836
  });
@@ -14013,6 +14013,8 @@
14013
14013
  this.menuItemSources = new Map();
14014
14014
  // Set when the data source order no longer matches the zIndexes seen, so it is re-applied once.
14015
14015
  this.sourceOrderDirty = false;
14016
+ // The look of labelled Entities no label group holds.
14017
+ this.labelDefaults = null;
14016
14018
  // Stops following what is simulated, so labels can read it again when it changes.
14017
14019
  this.simulationRemoval = null;
14018
14020
  this.shadowsRemoval = null;
@@ -16867,6 +16869,25 @@
16867
16869
  var _a;
16868
16870
  return (_a = this.labelGroups) === null || _a === void 0 ? void 0 : _a.Resolve(entityId, menuItemId);
16869
16871
  }
16872
+ /*
16873
+ * How a labelled Entity in no label group is drawn, such as an account's default look; null draws plain text.
16874
+ */
16875
+ SetLabelDefaults(options) {
16876
+ if (this.disposed) {
16877
+ return;
16878
+ }
16879
+ const next = options ? { ...options } : null;
16880
+ if (JSON.stringify(next) === JSON.stringify(this.labelDefaults)) {
16881
+ return;
16882
+ }
16883
+ this.labelDefaults = next;
16884
+ for (const entityId of this.GetLabelled()) {
16885
+ this.queueUpdate({ entityId, refresh: false });
16886
+ }
16887
+ }
16888
+ GetLabelDefaults() {
16889
+ return this.labelDefaults ? { ...this.labelDefaults } : null;
16890
+ }
16870
16891
  /*
16871
16892
  * Called by a group label once it is on screen, so its entity's default image is read only when it can be seen.
16872
16893
  */
@@ -61105,7 +61126,7 @@ void main() {
61105
61126
  StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
61106
61127
  })(exports.StyleUtils || (exports.StyleUtils = {}));
61107
61128
 
61108
- const VERSION = "7.9.0";
61129
+ const VERSION = "7.9.1";
61109
61130
  /**
61110
61131
  * Updates the environment instance used by bruce-cesium to one specified.
61111
61132
  * This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.