bruce-cesium 5.9.9 → 6.0.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.
@@ -10715,12 +10715,20 @@
10715
10715
  CesiumAnimatedInOut.AnimateOut = AnimateOut;
10716
10716
  })(exports.CesiumAnimatedInOut || (exports.CesiumAnimatedInOut = {}));
10717
10717
 
10718
- // Constants for update source types
10719
- const UPDATE_SOURCES = {
10720
- TREE_CASCADE: "tree-cascade",
10721
- TILESET_DISPOSE: "tileset-dispose",
10722
- OSM_TILESET_DISPOSE: "osm-tileset-dispose"
10723
- };
10718
+ (function (UpdateSource) {
10719
+ UpdateSource["TREE_CASCADE"] = "tree-cascade";
10720
+ UpdateSource["TILESET_DISPOSE"] = "tileset-dispose";
10721
+ UpdateSource["OSM_TILESET_DISPOSE"] = "osm-tileset-dispose";
10722
+ UpdateSource["ADD_REGO_REPLACE"] = "add-rego-replace";
10723
+ UpdateSource["ENTITIES_LOADED_REMOVE"] = "entities-loaded-remove";
10724
+ UpdateSource["ENTITIES_LOADED_CLEAR"] = "entities-loaded-clear";
10725
+ UpdateSource["ENTITIES_LOADED_DISPOSE"] = "entities-loaded-dispose";
10726
+ UpdateSource["ENTITIES_TAG_FILTER"] = "entities-tag-filter";
10727
+ UpdateSource["ENTITIES_DISABLED"] = "entities-disabled";
10728
+ UpdateSource["ENTITIES_DISPOSE"] = "entities-dispose";
10729
+ UpdateSource["RELATIONS_FILTER"] = "relations-filter";
10730
+ UpdateSource["RELATIONS_DISPOSE"] = "relations-dispose"; // Triggered when relations render manager is disposed.
10731
+ })(exports.UpdateSource || (exports.UpdateSource = {}));
10724
10732
  /**
10725
10733
  * Returns if a given visual is alive and in the scene.
10726
10734
  * @param viewer
@@ -11192,7 +11200,7 @@
11192
11200
  });
11193
11201
  }
11194
11202
  // Trigger update event.
11195
- if (this.onUpdate && source !== UPDATE_SOURCES.TREE_CASCADE) {
11203
+ if (this.onUpdate && source !== exports.UpdateSource.TREE_CASCADE) {
11196
11204
  const update = {
11197
11205
  type: EVisualUpdateType.Update,
11198
11206
  entityId: state.entityId
@@ -11283,7 +11291,7 @@
11283
11291
  }
11284
11292
  }
11285
11293
  // Trigger update event.
11286
- if (this.onUpdate && source !== UPDATE_SOURCES.TREE_CASCADE) {
11294
+ if (this.onUpdate && source !== exports.UpdateSource.TREE_CASCADE) {
11287
11295
  const keys = Object.keys(states);
11288
11296
  for (let i = 0; i < keys.length; i++) {
11289
11297
  const key = keys[i];
@@ -11565,7 +11573,7 @@
11565
11573
  if (source) {
11566
11574
  update.source = source;
11567
11575
  }
11568
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
11576
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
11569
11577
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11570
11578
  }
11571
11579
  }
@@ -11731,7 +11739,7 @@
11731
11739
  if (source) {
11732
11740
  update.source = source;
11733
11741
  }
11734
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
11742
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
11735
11743
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11736
11744
  }
11737
11745
  }
@@ -11777,7 +11785,7 @@
11777
11785
  if (params === null || params === void 0 ? void 0 : params.source) {
11778
11786
  update.source = params.source;
11779
11787
  }
11780
- if ((params === null || params === void 0 ? void 0 : params.source) !== UPDATE_SOURCES.TREE_CASCADE) {
11788
+ if ((params === null || params === void 0 ? void 0 : params.source) !== exports.UpdateSource.TREE_CASCADE) {
11781
11789
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11782
11790
  }
11783
11791
  if ((params === null || params === void 0 ? void 0 : params.requestRender) != false) {
@@ -11927,7 +11935,7 @@
11927
11935
  if (source) {
11928
11936
  update.source = source;
11929
11937
  }
11930
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
11938
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
11931
11939
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11932
11940
  }
11933
11941
  }
@@ -12039,7 +12047,7 @@
12039
12047
  if (params === null || params === void 0 ? void 0 : params.source) {
12040
12048
  update.source = params.source;
12041
12049
  }
12042
- if ((params === null || params === void 0 ? void 0 : params.source) !== UPDATE_SOURCES.TREE_CASCADE) {
12050
+ if ((params === null || params === void 0 ? void 0 : params.source) !== exports.UpdateSource.TREE_CASCADE) {
12043
12051
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12044
12052
  }
12045
12053
  }
@@ -12055,7 +12063,7 @@
12055
12063
  menuItemId: rego.menuItemId,
12056
12064
  doUpdate: false,
12057
12065
  requestRender: false,
12058
- source: "add-rego-replace"
12066
+ source: exports.UpdateSource.ADD_REGO_REPLACE
12059
12067
  });
12060
12068
  }
12061
12069
  const entityId = rego.entityId;
@@ -12079,7 +12087,7 @@
12079
12087
  if (source) {
12080
12088
  update.source = source;
12081
12089
  }
12082
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12090
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
12083
12091
  (_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
12084
12092
  }
12085
12093
  if (requestRender != false) {
@@ -12201,7 +12209,7 @@
12201
12209
  if (source) {
12202
12210
  update.source = source;
12203
12211
  }
12204
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12212
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
12205
12213
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12206
12214
  }
12207
12215
  if (doesInclude) {
@@ -12240,7 +12248,7 @@
12240
12248
  if (source) {
12241
12249
  update.source = source;
12242
12250
  }
12243
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12251
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
12244
12252
  (_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
12245
12253
  }
12246
12254
  this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
@@ -12275,7 +12283,7 @@
12275
12283
  if (source) {
12276
12284
  update.source = source;
12277
12285
  }
12278
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12286
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
12279
12287
  (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(update);
12280
12288
  }
12281
12289
  if (doUpdate && menuItemId) {
@@ -12382,7 +12390,7 @@
12382
12390
  if (source) {
12383
12391
  update.source = source;
12384
12392
  }
12385
- if (source !== UPDATE_SOURCES.TREE_CASCADE) {
12393
+ if (source !== exports.UpdateSource.TREE_CASCADE) {
12386
12394
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12387
12395
  }
12388
12396
  this.queueUpdate({
@@ -13419,14 +13427,14 @@
13419
13427
  this.visualsManager.RemoveRegos({
13420
13428
  menuItemId: this.item.id,
13421
13429
  retainTagIds: tagsToRender,
13422
- source: "entities-tag-filter"
13430
+ source: exports.UpdateSource.ENTITIES_TAG_FILTER
13423
13431
  });
13424
13432
  (_j = this.clustering) === null || _j === void 0 ? void 0 : _j.Dispose();
13425
13433
  }
13426
13434
  else {
13427
13435
  this.visualsManager.RemoveRegos({
13428
13436
  menuItemId: this.item.id,
13429
- source: "entities-disabled"
13437
+ source: exports.UpdateSource.ENTITIES_DISABLED
13430
13438
  });
13431
13439
  (_k = this.clustering) === null || _k === void 0 ? void 0 : _k.Dispose();
13432
13440
  return;
@@ -13568,7 +13576,7 @@
13568
13576
  this.disposed = true;
13569
13577
  this.visualsManager.RemoveRegos({
13570
13578
  menuItemId: this.item.id,
13571
- source: "entities-dispose"
13579
+ source: exports.UpdateSource.ENTITIES_DISPOSE
13572
13580
  });
13573
13581
  (_a = this.entityCheckRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
13574
13582
  (_b = this.viewMonitorRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
@@ -14423,7 +14431,7 @@
14423
14431
  this.visualsManager.RemoveRegos({
14424
14432
  entityId: x,
14425
14433
  menuItemId: this.item.id,
14426
- source: "entities-loaded-remove"
14434
+ source: exports.UpdateSource.ENTITIES_LOADED_REMOVE
14427
14435
  });
14428
14436
  this.renderedEntities[x] = false;
14429
14437
  });
@@ -14440,7 +14448,7 @@
14440
14448
  this.item.BruceEntity.Entities = [];
14441
14449
  this.visualsManager.RemoveRegos({
14442
14450
  menuItemId: this.item.id,
14443
- source: "entities-loaded-clear"
14451
+ source: exports.UpdateSource.ENTITIES_LOADED_CLEAR
14444
14452
  });
14445
14453
  this.renderedEntities = {};
14446
14454
  this.recreateGetter();
@@ -14505,7 +14513,7 @@
14505
14513
  this.disposed = true;
14506
14514
  this.visualsManager.RemoveRegos({
14507
14515
  menuItemId: this.item.id,
14508
- source: "entities-loaded-dispose"
14516
+ source: exports.UpdateSource.ENTITIES_LOADED_DISPOSE
14509
14517
  });
14510
14518
  for (let i = 0; i < this.sources.length; i++) {
14511
14519
  const source = this.sources[i];
@@ -18689,7 +18697,7 @@
18689
18697
  requestRender: false,
18690
18698
  menuItemId: this.item.id,
18691
18699
  doRemove: false,
18692
- source: UPDATE_SOURCES.TILESET_DISPOSE
18700
+ source: exports.UpdateSource.TILESET_DISPOSE
18693
18701
  });
18694
18702
  // Might have to do something smarter since siblings could still be OK.
18695
18703
  this.loadedCesiumEntities[rego.entityId] = null;
@@ -18973,7 +18981,7 @@
18973
18981
  this.visualsManager.RemoveRegos({
18974
18982
  menuItemId: this.item.id,
18975
18983
  doRemove: false,
18976
- source: UPDATE_SOURCES.TILESET_DISPOSE
18984
+ source: exports.UpdateSource.TILESET_DISPOSE
18977
18985
  });
18978
18986
  this.viewerDateTimeDispose();
18979
18987
  }
@@ -19472,7 +19480,7 @@
19472
19480
  }
19473
19481
  this.visualsManager.RemoveRegos({
19474
19482
  menuItemId: this.item.id,
19475
- source: UPDATE_SOURCES.OSM_TILESET_DISPOSE
19483
+ source: exports.UpdateSource.OSM_TILESET_DISPOSE
19476
19484
  });
19477
19485
  this.featureQueue = [];
19478
19486
  }
@@ -20661,7 +20669,7 @@
20661
20669
  entityId: rego.entityId,
20662
20670
  menuItemId: this.item.id,
20663
20671
  requestRender: false,
20664
- source: "relations-filter"
20672
+ source: exports.UpdateSource.RELATIONS_FILTER
20665
20673
  });
20666
20674
  }
20667
20675
  }
@@ -20709,7 +20717,7 @@
20709
20717
  this.disposed = true;
20710
20718
  this.register.RemoveRegos({
20711
20719
  menuItemId: this.item.id,
20712
- source: "relations-dispose"
20720
+ source: exports.UpdateSource.RELATIONS_DISPOSE
20713
20721
  });
20714
20722
  }
20715
20723
  /**
@@ -20970,7 +20978,7 @@
20970
20978
  menuItemId: this.item.id,
20971
20979
  relation: relation,
20972
20980
  requestRender: false,
20973
- source: "relations-filter"
20981
+ source: exports.UpdateSource.RELATIONS_FILTER
20974
20982
  });
20975
20983
  }
20976
20984
  const key = RelationRenderEngine.GetRenderGroupId(relation);
@@ -33212,11 +33220,10 @@
33212
33220
  }
33213
33221
  }
33214
33222
 
33215
- const VERSION = "5.9.9";
33223
+ const VERSION = "6.0.1";
33216
33224
 
33217
33225
  exports.VERSION = VERSION;
33218
33226
  exports.isOutlineChanged = isOutlineChanged;
33219
- exports.UPDATE_SOURCES = UPDATE_SOURCES;
33220
33227
  exports.CesiumParabola = CesiumParabola;
33221
33228
  exports.CESIUM_INSPECTOR_KEY = CESIUM_INSPECTOR_KEY;
33222
33229
  exports.CESIUM_TIMELINE_KEY = CESIUM_TIMELINE_KEY;