bruce-cesium 4.9.4 → 4.9.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.
@@ -1,6 +1,6 @@
1
- import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, AbstractApi, Session, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
1
+ import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttachment, EntityAttachmentType, EntityAttribute, AbstractApi, Session } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, Matrix4, Matrix3, IonResource, Quaternion, BoundingSphere, GeometryInstance, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ClassificationType, ConstantPositionProperty, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, SceneMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, BoundingSphere, GeometryInstance, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
4
4
 
5
5
  const TIME_LAG = 300;
6
6
  const POSITION_CHECK_TIMER = 950;
@@ -7637,7 +7637,7 @@ var EntityRenderEngine;
7637
7637
  }
7638
7638
  EntityRenderEngine.GetRenderGroupId = GetRenderGroupId;
7639
7639
  async function Render(params) {
7640
- var _a, _b, _c, _d, _e, _f, _g, _h;
7640
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
7641
7641
  const groupRenderParams = {
7642
7642
  apiGetter: params.apiGetter,
7643
7643
  viewer: params.viewer,
@@ -7735,8 +7735,9 @@ var EntityRenderEngine;
7735
7735
  // Update metadata for the same reason.
7736
7736
  existingRego.historicDateTime = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.HistoricDateTime;
7737
7737
  existingRego.historicAttrKey = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.HistoricAttrKey;
7738
+ existingRego.historicLayers = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricLayers;
7738
7739
  existingRego.entityTypeId = entity.Bruce["EntityType.ID"];
7739
- existingRego.scenario = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.Scenario;
7740
+ existingRego.scenario = (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.Scenario;
7740
7741
  updated.set(id, true);
7741
7742
  }
7742
7743
  if (displayType == ZoomControl.EDisplayType.Model3D) {
@@ -7749,7 +7750,7 @@ var EntityRenderEngine;
7749
7750
  entity: entity,
7750
7751
  path: ["Bruce", "VectorGeometry"]
7751
7752
  });
7752
- if ((_g = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _g === void 0 ? void 0 : _g.length) {
7753
+ if ((_h = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _h === void 0 ? void 0 : _h.length) {
7753
7754
  multiGeometry.push(entity);
7754
7755
  }
7755
7756
  else {
@@ -7792,7 +7793,7 @@ var EntityRenderEngine;
7792
7793
  entity: entity,
7793
7794
  path: ["Bruce", "VectorGeometry"]
7794
7795
  });
7795
- if (!((_h = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _h === void 0 ? void 0 : _h.length)) {
7796
+ if (!((_j = geometry === null || geometry === void 0 ? void 0 : geometry.MultiGeometry) === null || _j === void 0 ? void 0 : _j.length)) {
7796
7797
  polygons.push(entity);
7797
7798
  continue;
7798
7799
  }
@@ -9872,61 +9873,67 @@ var VisualsRegister;
9872
9873
  return changed;
9873
9874
  }
9874
9875
  SetStates(states) {
9876
+ // Array of changed Entity IDs so we know what to refresh/notify at the end.
9875
9877
  const entityIds = [];
9878
+ // If we need to update all Entities.
9879
+ // This is usually for isolation changes.
9876
9880
  let updateAll = false;
9881
+ // Map of individual Entity refresh settings.
9877
9882
  let refresh = {};
9883
+ // Settings to apply if a refresh-all is needed.
9884
+ let refreshAccumulated = {};
9885
+ // Indicator that at least one Entity state was updated.
9878
9886
  let changed = false;
9879
9887
  const updateRefreshMarkers = (state) => {
9880
9888
  if (state.hasOwnProperty("isolated")) {
9881
9889
  updateAll = true;
9882
9890
  }
9891
+ let values = refresh[state.entityId];
9892
+ if (!values) {
9893
+ values = refresh[state.entityId] = {};
9894
+ }
9883
9895
  if (state.hasOwnProperty("highlighted")) {
9884
- refresh.highlighted = true;
9896
+ values.highlighted = true;
9897
+ refreshAccumulated.highlighted = true;
9885
9898
  }
9886
9899
  if (state.hasOwnProperty("selected")) {
9887
- refresh.selected = true;
9900
+ values.selected = true;
9901
+ refreshAccumulated.selected = true;
9888
9902
  }
9889
9903
  if (state.hasOwnProperty("opacity")) {
9890
- refresh.opacity = true;
9904
+ values.opacity = true;
9905
+ refreshAccumulated.opacity = true;
9906
+ }
9907
+ };
9908
+ const doUpdate = (state) => {
9909
+ const eChanged = this.SetState(state, false);
9910
+ if (eChanged && !entityIds.includes(state.entityId)) {
9911
+ updateRefreshMarkers(state);
9912
+ entityIds.push(state.entityId);
9913
+ changed = true;
9891
9914
  }
9892
9915
  };
9893
9916
  if (Array.isArray(states)) {
9894
9917
  for (let i = 0; i < states.length; i++) {
9895
- const eChanged = this.SetState(states[i], false);
9896
- if (eChanged && !entityIds.includes(states[i].entityId)) {
9897
- updateRefreshMarkers(states[i]);
9898
- entityIds.push(states[i].entityId);
9899
- changed = true;
9900
- }
9918
+ doUpdate(states[i]);
9901
9919
  }
9902
9920
  }
9903
9921
  else {
9904
- const keys = Object.keys(states);
9905
- for (let i = 0; i < keys.length; i++) {
9906
- const key = keys[i];
9907
- const eChanged = this.SetState(states[key], false);
9908
- if (eChanged && !entityIds.includes(states[key].entityId)) {
9909
- updateRefreshMarkers(states[key]);
9910
- entityIds.push(states[key].entityId);
9911
- changed = true;
9912
- }
9913
- }
9922
+ Object.values(states).forEach(state => {
9923
+ doUpdate(state);
9924
+ });
9914
9925
  }
9915
9926
  if (changed) {
9916
9927
  if (updateAll) {
9917
9928
  this.updateAllEntities({
9918
- refresh: {
9919
- ...refresh
9920
- }
9929
+ refresh: refreshAccumulated
9921
9930
  });
9922
9931
  }
9923
9932
  else {
9924
9933
  for (let i = 0; i < entityIds.length; i++) {
9925
9934
  this.queueUpdate({
9926
9935
  entityId: entityIds[i],
9927
- refresh: {
9928
- ...refresh
9929
- }
9936
+ refresh: refresh[entityIds[i]]
9930
9937
  });
9931
9938
  }
9932
9939
  }
@@ -9964,79 +9971,49 @@ var VisualsRegister;
9964
9971
  * @param params
9965
9972
  */
9966
9973
  setStateValues(values) {
9967
- let keys = Object.keys(values);
9968
- keys = keys.filter(k => k !== "entityId" && k !== "menuItemId");
9974
+ const { entityId, menuItemId } = values;
9975
+ const keys = Object.keys(values).filter(k => k !== "entityId" && k !== "menuItemId");
9976
+ if (!keys.length) {
9977
+ return false;
9978
+ }
9969
9979
  let changed = false;
9970
- const update = (entityId, menuItemId) => {
9971
- if (!menuItemId) {
9972
- menuItemId = NO_MENU_ITEM_KEY;
9973
- }
9974
- let state;
9975
- let eStates = this.states[entityId];
9976
- if (eStates) {
9977
- state = eStates[menuItemId];
9978
- }
9979
- if (!state) {
9980
- state = getBlankState(values.entityId, values.menuItemId);
9981
- if (!eStates) {
9982
- eStates = {};
9983
- this.states[entityId] = eStates;
9984
- }
9985
- eStates[menuItemId] = state;
9986
- }
9987
- for (let i = 0; i < keys.length; i++) {
9988
- const k = keys[i];
9989
- if (state[k] !== values[k]) {
9990
- changed = true;
9991
- }
9992
- state[k] = values[k];
9993
- if (state[k] == null) {
9994
- delete state[k];
9995
- }
9996
- }
9997
- if (isBlankState(state)) {
9998
- delete eStates[menuItemId];
9999
- if (Object.keys(eStates).length === 0) {
10000
- delete this.states[entityId];
10001
- }
10002
- }
10003
- };
10004
- const strip = (entityId, menuItemId) => {
10005
- if (!menuItemId) {
10006
- menuItemId = NO_MENU_ITEM_KEY;
10007
- }
10008
- const eStates = this.states[entityId];
10009
- if (!eStates) {
10010
- return;
10011
- }
10012
- const state = eStates[menuItemId];
10013
- if (!state) {
10014
- return;
9980
+ const eStates = this.states[entityId] || {};
9981
+ this.states[entityId] = eStates;
9982
+ const targetMenuItemId = menuItemId || NO_MENU_ITEM_KEY;
9983
+ let state = eStates[targetMenuItemId] || getBlankState(entityId, menuItemId);
9984
+ eStates[targetMenuItemId] = state;
9985
+ // Update state and detect changes.
9986
+ for (const key of keys) {
9987
+ if (state[key] !== values[key]) {
9988
+ state[key] = values[key];
9989
+ changed = true;
10015
9990
  }
10016
- for (let i = 0; i < keys.length; i++) {
10017
- const k = keys[i];
10018
- if (state.hasOwnProperty(k)) {
10019
- delete state[k];
10020
- }
9991
+ if (state[key] == null) {
9992
+ delete state[key];
10021
9993
  }
10022
- if (isBlankState(state)) {
10023
- delete eStates[menuItemId];
10024
- if (Object.keys(eStates).length === 0) {
10025
- delete this.states[entityId];
10026
- }
9994
+ }
9995
+ if (isBlankState(state)) {
9996
+ delete eStates[targetMenuItemId];
9997
+ if (Object.keys(eStates).length === 0) {
9998
+ delete this.states[entityId];
10027
9999
  }
10028
- };
10029
- update(values.entityId, values.menuItemId);
10030
- // If there is no Menu Item ID, then we want to strip the settings we updated from the Menu Item specific settings.
10031
- if (!values.menuItemId) {
10032
- const eStates = this.states[values.entityId];
10033
- if (eStates) {
10034
- for (const key in eStates) {
10035
- if (key !== NO_MENU_ITEM_KEY) {
10036
- strip(values.entityId, key);
10000
+ }
10001
+ // If no menuItemId, strip matching keys from other menu item states.
10002
+ if (!menuItemId) {
10003
+ for (const key in eStates) {
10004
+ if (key !== NO_MENU_ITEM_KEY) {
10005
+ const otherState = eStates[key];
10006
+ for (const stateKey of keys) {
10007
+ delete otherState[stateKey];
10008
+ }
10009
+ if (isBlankState(otherState)) {
10010
+ delete eStates[key];
10037
10011
  }
10038
10012
  }
10039
10013
  }
10014
+ if (Object.keys(eStates).length === 0) {
10015
+ delete this.states[entityId];
10016
+ }
10040
10017
  }
10041
10018
  return changed;
10042
10019
  }
@@ -12050,7 +12027,7 @@ var EntitiesRenderManager;
12050
12027
  }, 3000);
12051
12028
  }
12052
12029
  setGetter() {
12053
- var _a, _b;
12030
+ var _a, _b, _c;
12054
12031
  this.unsetGetter();
12055
12032
  const isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
12056
12033
  let tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
@@ -12070,9 +12047,10 @@ var EntitiesRenderManager;
12070
12047
  tagIds: (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [],
12071
12048
  debugShowBounds: getShowDebugBounds(),
12072
12049
  cdn: this.item.cdnEnabled,
12050
+ historic: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.historic,
12073
12051
  historicAttrKey: this.item.BruceEntity.historicAttrKey,
12074
12052
  historicInterpolation: this.item.historicInterpolation,
12075
- schemaId: (_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.schemaId,
12053
+ schemaId: (_c = this.item.BruceEntity) === null || _c === void 0 ? void 0 : _c.schemaId,
12076
12054
  scenario: this.scenario
12077
12055
  });
12078
12056
  const minMax = RenderManager.GetZoomMinMax({
@@ -12653,12 +12631,12 @@ var EntitiesRenderManager;
12653
12631
  * @returns
12654
12632
  */
12655
12633
  async renderAsIndividuals(entities, force = false) {
12656
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
12634
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
12657
12635
  // Entity ID -> historic records array.
12658
12636
  // We load this as extra information when rendering historic records.
12659
12637
  // This way we know what to animate towards as time changes.
12660
12638
  let entitiesHistoric = {};
12661
- if (((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey) && entities.length) {
12639
+ if ((((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historic) || ((_b = this.item.BruceEntity) === null || _b === void 0 ? void 0 : _b.historicAttrKey)) && entities.length) {
12662
12640
  // Interpolating.
12663
12641
  // We will allow non-historic Entities as long as they have historic data in the range.
12664
12642
  if (this.item.historicInterpolation) {
@@ -12684,14 +12662,14 @@ var EntitiesRenderManager;
12684
12662
  menuItemId: this.item.id,
12685
12663
  requestRender: false
12686
12664
  });
12687
- (_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(removeId, false);
12665
+ (_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(removeId, false);
12688
12666
  }
12689
12667
  entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
12690
12668
  }
12691
12669
  // Not interpolating.
12692
12670
  // So we'll see if the Entities have a historic key or not.
12693
12671
  else {
12694
- const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.HistoricAttrKey); }).map(x => x.Bruce.ID);
12672
+ const toRemoveIds = entities.filter(x => { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.HistoricLayers); }).map(x => x.Bruce.ID);
12695
12673
  for (let i = 0; i < toRemoveIds.length; i++) {
12696
12674
  const removeId = toRemoveIds[i];
12697
12675
  this.visualsManager.RemoveRegos({
@@ -12699,7 +12677,7 @@ var EntitiesRenderManager;
12699
12677
  menuItemId: this.item.id,
12700
12678
  requestRender: false
12701
12679
  });
12702
- (_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(removeId, false);
12680
+ (_d = this.clustering) === null || _d === void 0 ? void 0 : _d.RemoveEntity(removeId, false);
12703
12681
  }
12704
12682
  entities = entities.filter(x => !toRemoveIds.includes(x.Bruce.ID));
12705
12683
  }
@@ -12739,10 +12717,10 @@ var EntitiesRenderManager;
12739
12717
  const visual = rego === null || rego === void 0 ? void 0 : rego.visual;
12740
12718
  if (!visual || visual != cEntity) {
12741
12719
  const wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
12742
- const tagIds = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d["Layer.ID"];
12720
+ const tagIds = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e["Layer.ID"];
12743
12721
  const rego = {
12744
12722
  entityId: id,
12745
- schemaId: (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.SchemaID,
12723
+ schemaId: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.SchemaID,
12746
12724
  menuItemId: this.item.id,
12747
12725
  menuItemType: this.item.Type,
12748
12726
  visual: cEntity,
@@ -12753,9 +12731,10 @@ var EntitiesRenderManager;
12753
12731
  overrideShow: wasClustered ? false : null,
12754
12732
  name: cEntity.name,
12755
12733
  cdn: this.item.cdnEnabled,
12756
- historicDateTime: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.HistoricDateTime,
12757
- historicAttrKey: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricAttrKey,
12758
- scenario: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.Scenario
12734
+ historicDateTime: (_g = entity.Bruce) === null || _g === void 0 ? void 0 : _g.HistoricDateTime,
12735
+ historicAttrKey: (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.HistoricAttrKey,
12736
+ historicLayers: (_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j.HistoricLayers,
12737
+ scenario: (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.Scenario
12759
12738
  };
12760
12739
  this.visualsManager.AddRego({
12761
12740
  rego,
@@ -12766,12 +12745,13 @@ var EntitiesRenderManager;
12766
12745
  rego.name = cEntity.name;
12767
12746
  rego.visual = cEntity;
12768
12747
  rego.entityTypeId = entity.Bruce["EntityType.ID"];
12769
- rego.tagIds = ((_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
12770
- rego.historicDateTime = (_k = entity.Bruce) === null || _k === void 0 ? void 0 : _k.HistoricDateTime;
12771
- rego.historicAttrKey = (_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l.HistoricAttrKey;
12748
+ rego.tagIds = ((_l = entity.Bruce) === null || _l === void 0 ? void 0 : _l["Layer.ID"]) ? [].concat(entity.Bruce["Layer.ID"]) : [];
12749
+ rego.historicDateTime = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.HistoricDateTime;
12750
+ rego.historicAttrKey = (_o = entity.Bruce) === null || _o === void 0 ? void 0 : _o.HistoricAttrKey;
12751
+ rego.historicLayers = (_p = entity.Bruce) === null || _p === void 0 ? void 0 : _p.HistoricLayers;
12772
12752
  rego.cdn = this.item.cdnEnabled;
12773
- rego.schemaId = (_m = entity.Bruce) === null || _m === void 0 ? void 0 : _m.SchemaID;
12774
- rego.scenario = (_o = entity.Bruce) === null || _o === void 0 ? void 0 : _o.Scenario;
12753
+ rego.schemaId = (_q = entity.Bruce) === null || _q === void 0 ? void 0 : _q.SchemaID;
12754
+ rego.scenario = (_r = entity.Bruce) === null || _r === void 0 ? void 0 : _r.Scenario;
12775
12755
  // Marked as stale meaning some change was performed that requires a refresh.
12776
12756
  // This usually means a new sibling was added that we need to update.
12777
12757
  if (rego.stale) {
@@ -12801,7 +12781,7 @@ var EntitiesRenderManager;
12801
12781
  menuItemId: this.item.id,
12802
12782
  requestRender: false
12803
12783
  });
12804
- (_p = this.clustering) === null || _p === void 0 ? void 0 : _p.RemoveEntity(id, false);
12784
+ (_s = this.clustering) === null || _s === void 0 ? void 0 : _s.RemoveEntity(id, false);
12805
12785
  }
12806
12786
  }
12807
12787
  this.viewer.scene.requestRender();
@@ -16278,10 +16258,11 @@ var EntityFilterGetter;
16278
16258
  // We use this for refreshing historic data without having to repeat geographic queries.
16279
16259
  this.gatheredIntegrity = null;
16280
16260
  this.gatheredEntityIds = [];
16281
- const { api, viewer, viewPort, typeId, schemaId, batchSize, attrFilter, historicAttrKey, historicInterpolation, viaCdn, scenario } = params;
16261
+ const { api, viewer, viewPort, typeId, schemaId, batchSize, attrFilter, historicAttrKey, historicInterpolation, historic, viaCdn, scenario } = params;
16282
16262
  this.api = api;
16283
16263
  this.typeId = typeId;
16284
16264
  this.schemaId = schemaId;
16265
+ this.historic = Boolean(historic);
16285
16266
  this.historicAttrKey = historicAttrKey;
16286
16267
  this.historicInterpolation = Boolean(historicInterpolation);
16287
16268
  this.viaCdn = Boolean(viaCdn);
@@ -16299,6 +16280,9 @@ var EntityFilterGetter;
16299
16280
  */
16300
16281
  getIntegrityId() {
16301
16282
  let integrity = this.tagIds == null ? "" : this.tagIds.join();
16283
+ if (this.historic) {
16284
+ integrity += "isHistoric";
16285
+ }
16302
16286
  if (this.historicAttrKey) {
16303
16287
  integrity += this.historicAttrKey;
16304
16288
  }
@@ -16331,7 +16315,7 @@ var EntityFilterGetter;
16331
16315
  * If there is no historic attr set, this will do nothing.
16332
16316
  */
16333
16317
  viewerDateTimeSub() {
16334
- if (!this.historicAttrKey || this.viewerDateTimeChangeRemoval) {
16318
+ if ((!this.historicAttrKey && !this.historic) || this.viewerDateTimeChangeRemoval) {
16335
16319
  return;
16336
16320
  }
16337
16321
  // This is multiplied by the speed of animation to figure
@@ -16374,7 +16358,7 @@ var EntityFilterGetter;
16374
16358
  };
16375
16359
  }
16376
16360
  updateHistoricDateTime() {
16377
- if (!this.historicAttrKey) {
16361
+ if (!this.historicAttrKey && !this.historic) {
16378
16362
  this.historicAttrDateTime = null;
16379
16363
  return;
16380
16364
  }
@@ -16555,7 +16539,7 @@ var EntityFilterGetter;
16555
16539
  api: this.api,
16556
16540
  scenario: this.scenario,
16557
16541
  historicKey: this.historicAttrKey,
16558
- historicPoint: this.historicAttrDateTime,
16542
+ historicPoint: (this.historicAttrKey || this.historic) ? this.historicAttrDateTime : null,
16559
16543
  schemaId: this.schemaId,
16560
16544
  filter: {
16561
16545
  pageSize: PAGE_SIZE,
@@ -16771,6 +16755,7 @@ function createFilterGetterCacheKey(params) {
16771
16755
  cacheKey += params.schemaId ? params.schemaId : "";
16772
16756
  cacheKey += JSON.stringify(params.tagIds ? params.tagIds : []);
16773
16757
  cacheKey += params.historicAttrKey ? params.historicAttrKey : "";
16758
+ cacheKey += params.historic ? "true" : "false";
16774
16759
  cacheKey += params.scenario ? params.scenario : 0;
16775
16760
  if (params.historicAttrKey) {
16776
16761
  cacheKey += params.historicInterpolation ? "true" : "false";
@@ -16798,6 +16783,7 @@ var SharedGetters;
16798
16783
  schemaId: params.schemaId,
16799
16784
  batchSize: params.batchSize,
16800
16785
  attrFilter: params.attrFilter,
16786
+ historic: params.historic,
16801
16787
  historicAttrKey: params.historicAttrKey,
16802
16788
  historicInterpolation: params.historicInterpolation,
16803
16789
  viaCdn: params.cdn,
@@ -28347,7 +28333,7 @@ class WidgetViewBar extends Widget.AWidget {
28347
28333
  }
28348
28334
  }
28349
28335
 
28350
- const VERSION = "4.9.4";
28336
+ const VERSION = "4.9.6";
28351
28337
 
28352
28338
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
28353
28339
  //# sourceMappingURL=bruce-cesium.es5.js.map