bruce-cesium 6.0.1 → 6.0.2

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,20 +10715,6 @@
10715
10715
  CesiumAnimatedInOut.AnimateOut = AnimateOut;
10716
10716
  })(exports.CesiumAnimatedInOut || (exports.CesiumAnimatedInOut = {}));
10717
10717
 
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 = {}));
10732
10718
  /**
10733
10719
  * Returns if a given visual is alive and in the scene.
10734
10720
  * @param viewer
@@ -11023,6 +11009,19 @@
11023
11009
  EVisualUpdateType["Update"] = "UPDATE";
11024
11010
  EVisualUpdateType["DeselectAll"] = "DESELECT_ALL";
11025
11011
  })(EVisualUpdateType = VisualsRegister.EVisualUpdateType || (VisualsRegister.EVisualUpdateType = {}));
11012
+ /**
11013
+ * Possible sources of visual updates (if source is known).
11014
+ * @warning under development. Expect changes.
11015
+ */
11016
+ let EUpdateSource;
11017
+ (function (EUpdateSource) {
11018
+ // Triggered by the tree cascade update.
11019
+ // TODO: seems specific to our ui-app, could we rename it to 'BULK_UPDATE' or 'SILENT' to indicate an ignore.
11020
+ EUpdateSource["TREE_CASCADE"] = "tree-cascade";
11021
+ // Triggered by a Tileset being disposed.
11022
+ // TODO: maybe generalize to 'MENU_ITEM_DISPOSE'?
11023
+ EUpdateSource["TILESET_DISPOSE"] = "tileset-dispose";
11024
+ })(EUpdateSource = VisualsRegister.EUpdateSource || (VisualsRegister.EUpdateSource = {}));
11026
11025
  class Register {
11027
11026
  get Id() {
11028
11027
  return this.id;
@@ -11200,7 +11199,7 @@
11200
11199
  });
11201
11200
  }
11202
11201
  // Trigger update event.
11203
- if (this.onUpdate && source !== exports.UpdateSource.TREE_CASCADE) {
11202
+ if (this.onUpdate && source !== EUpdateSource.TREE_CASCADE) {
11204
11203
  const update = {
11205
11204
  type: EVisualUpdateType.Update,
11206
11205
  entityId: state.entityId
@@ -11291,7 +11290,7 @@
11291
11290
  }
11292
11291
  }
11293
11292
  // Trigger update event.
11294
- if (this.onUpdate && source !== exports.UpdateSource.TREE_CASCADE) {
11293
+ if (this.onUpdate && source !== EUpdateSource.TREE_CASCADE) {
11295
11294
  const keys = Object.keys(states);
11296
11295
  for (let i = 0; i < keys.length; i++) {
11297
11296
  const key = keys[i];
@@ -11573,7 +11572,7 @@
11573
11572
  if (source) {
11574
11573
  update.source = source;
11575
11574
  }
11576
- if (source !== exports.UpdateSource.TREE_CASCADE) {
11575
+ if (source !== EUpdateSource.TREE_CASCADE) {
11577
11576
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11578
11577
  }
11579
11578
  }
@@ -11739,7 +11738,7 @@
11739
11738
  if (source) {
11740
11739
  update.source = source;
11741
11740
  }
11742
- if (source !== exports.UpdateSource.TREE_CASCADE) {
11741
+ if (source !== EUpdateSource.TREE_CASCADE) {
11743
11742
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11744
11743
  }
11745
11744
  }
@@ -11785,7 +11784,7 @@
11785
11784
  if (params === null || params === void 0 ? void 0 : params.source) {
11786
11785
  update.source = params.source;
11787
11786
  }
11788
- if ((params === null || params === void 0 ? void 0 : params.source) !== exports.UpdateSource.TREE_CASCADE) {
11787
+ if ((params === null || params === void 0 ? void 0 : params.source) !== EUpdateSource.TREE_CASCADE) {
11789
11788
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11790
11789
  }
11791
11790
  if ((params === null || params === void 0 ? void 0 : params.requestRender) != false) {
@@ -11935,7 +11934,7 @@
11935
11934
  if (source) {
11936
11935
  update.source = source;
11937
11936
  }
11938
- if (source !== exports.UpdateSource.TREE_CASCADE) {
11937
+ if (source !== EUpdateSource.TREE_CASCADE) {
11939
11938
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
11940
11939
  }
11941
11940
  }
@@ -12047,7 +12046,7 @@
12047
12046
  if (params === null || params === void 0 ? void 0 : params.source) {
12048
12047
  update.source = params.source;
12049
12048
  }
12050
- if ((params === null || params === void 0 ? void 0 : params.source) !== exports.UpdateSource.TREE_CASCADE) {
12049
+ if ((params === null || params === void 0 ? void 0 : params.source) !== EUpdateSource.TREE_CASCADE) {
12051
12050
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12052
12051
  }
12053
12052
  }
@@ -12062,8 +12061,7 @@
12062
12061
  entityId: rego.entityId,
12063
12062
  menuItemId: rego.menuItemId,
12064
12063
  doUpdate: false,
12065
- requestRender: false,
12066
- source: exports.UpdateSource.ADD_REGO_REPLACE
12064
+ requestRender: false
12067
12065
  });
12068
12066
  }
12069
12067
  const entityId = rego.entityId;
@@ -12087,7 +12085,7 @@
12087
12085
  if (source) {
12088
12086
  update.source = source;
12089
12087
  }
12090
- if (source !== exports.UpdateSource.TREE_CASCADE) {
12088
+ if (source !== EUpdateSource.TREE_CASCADE) {
12091
12089
  (_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
12092
12090
  }
12093
12091
  if (requestRender != false) {
@@ -12209,7 +12207,7 @@
12209
12207
  if (source) {
12210
12208
  update.source = source;
12211
12209
  }
12212
- if (source !== exports.UpdateSource.TREE_CASCADE) {
12210
+ if (source !== EUpdateSource.TREE_CASCADE) {
12213
12211
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12214
12212
  }
12215
12213
  if (doesInclude) {
@@ -12248,7 +12246,7 @@
12248
12246
  if (source) {
12249
12247
  update.source = source;
12250
12248
  }
12251
- if (source !== exports.UpdateSource.TREE_CASCADE) {
12249
+ if (source !== EUpdateSource.TREE_CASCADE) {
12252
12250
  (_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger(update);
12253
12251
  }
12254
12252
  this.rego[entityId] = entityRegos.filter(r => r.menuItemId !== menuItemId);
@@ -12283,7 +12281,7 @@
12283
12281
  if (source) {
12284
12282
  update.source = source;
12285
12283
  }
12286
- if (source !== exports.UpdateSource.TREE_CASCADE) {
12284
+ if (source !== EUpdateSource.TREE_CASCADE) {
12287
12285
  (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(update);
12288
12286
  }
12289
12287
  if (doUpdate && menuItemId) {
@@ -12390,7 +12388,7 @@
12390
12388
  if (source) {
12391
12389
  update.source = source;
12392
12390
  }
12393
- if (source !== exports.UpdateSource.TREE_CASCADE) {
12391
+ if (source !== EUpdateSource.TREE_CASCADE) {
12394
12392
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(update);
12395
12393
  }
12396
12394
  this.queueUpdate({
@@ -13426,15 +13424,13 @@
13426
13424
  if (shouldRender) {
13427
13425
  this.visualsManager.RemoveRegos({
13428
13426
  menuItemId: this.item.id,
13429
- retainTagIds: tagsToRender,
13430
- source: exports.UpdateSource.ENTITIES_TAG_FILTER
13427
+ retainTagIds: tagsToRender
13431
13428
  });
13432
13429
  (_j = this.clustering) === null || _j === void 0 ? void 0 : _j.Dispose();
13433
13430
  }
13434
13431
  else {
13435
13432
  this.visualsManager.RemoveRegos({
13436
- menuItemId: this.item.id,
13437
- source: exports.UpdateSource.ENTITIES_DISABLED
13433
+ menuItemId: this.item.id
13438
13434
  });
13439
13435
  (_k = this.clustering) === null || _k === void 0 ? void 0 : _k.Dispose();
13440
13436
  return;
@@ -13575,8 +13571,7 @@
13575
13571
  this.unsetGetter();
13576
13572
  this.disposed = true;
13577
13573
  this.visualsManager.RemoveRegos({
13578
- menuItemId: this.item.id,
13579
- source: exports.UpdateSource.ENTITIES_DISPOSE
13574
+ menuItemId: this.item.id
13580
13575
  });
13581
13576
  (_a = this.entityCheckRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
13582
13577
  (_b = this.viewMonitorRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
@@ -14430,8 +14425,7 @@
14430
14425
  }
14431
14426
  this.visualsManager.RemoveRegos({
14432
14427
  entityId: x,
14433
- menuItemId: this.item.id,
14434
- source: exports.UpdateSource.ENTITIES_LOADED_REMOVE
14428
+ menuItemId: this.item.id
14435
14429
  });
14436
14430
  this.renderedEntities[x] = false;
14437
14431
  });
@@ -14447,8 +14441,7 @@
14447
14441
  }
14448
14442
  this.item.BruceEntity.Entities = [];
14449
14443
  this.visualsManager.RemoveRegos({
14450
- menuItemId: this.item.id,
14451
- source: exports.UpdateSource.ENTITIES_LOADED_CLEAR
14444
+ menuItemId: this.item.id
14452
14445
  });
14453
14446
  this.renderedEntities = {};
14454
14447
  this.recreateGetter();
@@ -14512,8 +14505,7 @@
14512
14505
  this.getterSub = null;
14513
14506
  this.disposed = true;
14514
14507
  this.visualsManager.RemoveRegos({
14515
- menuItemId: this.item.id,
14516
- source: exports.UpdateSource.ENTITIES_LOADED_DISPOSE
14508
+ menuItemId: this.item.id
14517
14509
  });
14518
14510
  for (let i = 0; i < this.sources.length; i++) {
14519
14511
  const source = this.sources[i];
@@ -18697,7 +18689,7 @@
18697
18689
  requestRender: false,
18698
18690
  menuItemId: this.item.id,
18699
18691
  doRemove: false,
18700
- source: exports.UpdateSource.TILESET_DISPOSE
18692
+ source: exports.VisualsRegister.EUpdateSource.TILESET_DISPOSE
18701
18693
  });
18702
18694
  // Might have to do something smarter since siblings could still be OK.
18703
18695
  this.loadedCesiumEntities[rego.entityId] = null;
@@ -18981,7 +18973,7 @@
18981
18973
  this.visualsManager.RemoveRegos({
18982
18974
  menuItemId: this.item.id,
18983
18975
  doRemove: false,
18984
- source: exports.UpdateSource.TILESET_DISPOSE
18976
+ source: exports.VisualsRegister.EUpdateSource.TILESET_DISPOSE
18985
18977
  });
18986
18978
  this.viewerDateTimeDispose();
18987
18979
  }
@@ -19479,8 +19471,7 @@
19479
19471
  this.cTileset = null;
19480
19472
  }
19481
19473
  this.visualsManager.RemoveRegos({
19482
- menuItemId: this.item.id,
19483
- source: exports.UpdateSource.OSM_TILESET_DISPOSE
19474
+ menuItemId: this.item.id
19484
19475
  });
19485
19476
  this.featureQueue = [];
19486
19477
  }
@@ -20668,8 +20659,7 @@
20668
20659
  relation: rego.relation,
20669
20660
  entityId: rego.entityId,
20670
20661
  menuItemId: this.item.id,
20671
- requestRender: false,
20672
- source: exports.UpdateSource.RELATIONS_FILTER
20662
+ requestRender: false
20673
20663
  });
20674
20664
  }
20675
20665
  }
@@ -20716,8 +20706,7 @@
20716
20706
  }
20717
20707
  this.disposed = true;
20718
20708
  this.register.RemoveRegos({
20719
- menuItemId: this.item.id,
20720
- source: exports.UpdateSource.RELATIONS_DISPOSE
20709
+ menuItemId: this.item.id
20721
20710
  });
20722
20711
  }
20723
20712
  /**
@@ -20977,8 +20966,7 @@
20977
20966
  entityId: rego.entityId,
20978
20967
  menuItemId: this.item.id,
20979
20968
  relation: relation,
20980
- requestRender: false,
20981
- source: exports.UpdateSource.RELATIONS_FILTER
20969
+ requestRender: false
20982
20970
  });
20983
20971
  }
20984
20972
  const key = RelationRenderEngine.GetRenderGroupId(relation);
@@ -33220,7 +33208,7 @@
33220
33208
  }
33221
33209
  }
33222
33210
 
33223
- const VERSION = "6.0.1";
33211
+ const VERSION = "6.0.2";
33224
33212
 
33225
33213
  exports.VERSION = VERSION;
33226
33214
  exports.isOutlineChanged = isOutlineChanged;