bruce-cesium 3.7.8 → 3.8.0

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
1
  import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, PolygonPipeline, Matrix4, Matrix3, IonResource, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Quaternion, Intersect } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, GeoJsonDataSource, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, EasingFunction, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, PolygonPipeline, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, CzmlDataSource, Quaternion, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -9828,10 +9828,11 @@ var EntitiesRenderManager;
9828
9828
  this.sources = [];
9829
9829
  };
9830
9830
  Manager.prototype.ReRender = function (params) {
9831
+ var _a;
9831
9832
  return __awaiter(this, void 0, void 0, function () {
9832
9833
  var entityIds, force, entities, data, e_1;
9833
- return __generator(this, function (_a) {
9834
- switch (_a.label) {
9834
+ return __generator(this, function (_b) {
9835
+ switch (_b.label) {
9835
9836
  case 0:
9836
9837
  entityIds = params.entityIds, force = params.force, entities = params.entities;
9837
9838
  if (entities && !entityIds) {
@@ -9852,17 +9853,19 @@ var EntitiesRenderManager;
9852
9853
  this.renderEntities(entities, true);
9853
9854
  return [3 /*break*/, 4];
9854
9855
  case 1:
9855
- _a.trys.push([1, 3, , 4]);
9856
+ _b.trys.push([1, 3, , 4]);
9856
9857
  return [4 /*yield*/, Entity$1.GetListByIds({
9857
9858
  api: this.apiGetter.getApi(),
9858
- entityIds: entityIds
9859
+ entityIds: entityIds,
9860
+ historicKey: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey,
9861
+ historicPoint: this.viewer.clock.currentTime.toString()
9859
9862
  })];
9860
9863
  case 2:
9861
- data = _a.sent();
9864
+ data = _b.sent();
9862
9865
  this.renderEntities(data.entities, true);
9863
9866
  return [3 /*break*/, 4];
9864
9867
  case 3:
9865
- e_1 = _a.sent();
9868
+ e_1 = _b.sent();
9866
9869
  console.error(e_1);
9867
9870
  return [3 /*break*/, 4];
9868
9871
  case 4: return [3 /*break*/, 8];
@@ -9872,8 +9875,8 @@ var EntitiesRenderManager;
9872
9875
  return [3 /*break*/, 8];
9873
9876
  case 6: return [4 /*yield*/, this.doEntityCheck(entityIds)];
9874
9877
  case 7:
9875
- _a.sent();
9876
- _a.label = 8;
9878
+ _b.sent();
9879
+ _b.label = 8;
9877
9880
  case 8: return [2 /*return*/];
9878
9881
  }
9879
9882
  });
@@ -9929,16 +9932,19 @@ var EntitiesRenderManager;
9929
9932
  if (!(ids.length > 0)) return [3 /*break*/, 4];
9930
9933
  checkBatch = function () { return __awaiter(_this, void 0, void 0, function () {
9931
9934
  var entityIds, entities;
9932
- return __generator(this, function (_a) {
9933
- switch (_a.label) {
9935
+ var _a;
9936
+ return __generator(this, function (_b) {
9937
+ switch (_b.label) {
9934
9938
  case 0:
9935
9939
  entityIds = ids.splice(0, CHECK_BATCH_SIZE);
9936
9940
  return [4 /*yield*/, Entity$1.GetListByIds({
9937
9941
  api: api,
9938
- entityIds: entityIds
9942
+ entityIds: entityIds,
9943
+ historicKey: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey,
9944
+ historicPoint: this.viewer.clock.currentTime.toString()
9939
9945
  })];
9940
9946
  case 1:
9941
- entities = (_a.sent()).entities;
9947
+ entities = (_b.sent()).entities;
9942
9948
  if (this.disposed) {
9943
9949
  return [2 /*return*/];
9944
9950
  }
@@ -13744,9 +13750,6 @@ var EntityFilterGetter;
13744
13750
  var integrity = this.tagIds == null ? "" : this.tagIds.join();
13745
13751
  if (this.historicAttrKey) {
13746
13752
  integrity += this.historicAttrKey;
13747
- if (this.historicAttrDateTime) {
13748
- integrity += this.historicAttrDateTime;
13749
- }
13750
13753
  }
13751
13754
  return integrity;
13752
13755
  };
@@ -13774,9 +13777,9 @@ var EntityFilterGetter;
13774
13777
  return;
13775
13778
  }
13776
13779
  var delayQueue = new DelayQueue(function () {
13777
- var current = _this.getIntegrityId();
13780
+ var current = _this.historicAttrDateTime;
13778
13781
  _this.updateHistoricDateTime();
13779
- if (current != _this.getIntegrityId()) {
13782
+ if (current != _this.historicAttrDateTime) {
13780
13783
  _this.updateState();
13781
13784
  }
13782
13785
  }, 250);
@@ -13795,8 +13798,6 @@ var EntityFilterGetter;
13795
13798
  Getter.prototype.updateHistoricDateTime = function () {
13796
13799
  if (!this.historicAttrKey) {
13797
13800
  this.historicAttrDateTime = null;
13798
- this.historicAttrDateTimeMin = null;
13799
- this.historicAttrDateTimeMax = null;
13800
13801
  return;
13801
13802
  }
13802
13803
  var isChanged = function (before, after) {
@@ -13811,16 +13812,8 @@ var EntityFilterGetter;
13811
13812
  };
13812
13813
  var oldDateTime = this.historicAttrDateTime ? new Date(this.historicAttrDateTime) : null;
13813
13814
  var newDateTime = JulianDate.toDate(this.viewer.clock.currentTime);
13814
- var oldDateMin = this.historicAttrDateTimeMin ? new Date(this.historicAttrDateTimeMin) : null;
13815
- var newDateMin = this.viewer.clock.startTime ? JulianDate.toDate(this.viewer.clock.startTime) : null;
13816
- var oldDateMax = this.historicAttrDateTimeMax ? new Date(this.historicAttrDateTimeMax) : null;
13817
- var newDateMax = this.viewer.clock.stopTime ? JulianDate.toDate(this.viewer.clock.stopTime) : null;
13818
- if (isChanged(oldDateTime, newDateTime) ||
13819
- isChanged(oldDateMin, newDateMin) ||
13820
- isChanged(oldDateMax, newDateMax)) {
13815
+ if (isChanged(oldDateTime, newDateTime)) {
13821
13816
  this.historicAttrDateTime = newDateTime.toISOString();
13822
- this.historicAttrDateTimeMin = newDateMin === null || newDateMin === void 0 ? void 0 : newDateMin.toISOString();
13823
- this.historicAttrDateTimeMax = newDateMax === null || newDateMax === void 0 ? void 0 : newDateMax.toISOString();
13824
13817
  }
13825
13818
  };
13826
13819
  Getter.prototype.viewerDateTimeDispose = function () {
@@ -13987,8 +13980,6 @@ var EntityFilterGetter;
13987
13980
  api: this.api,
13988
13981
  historicKey: this.historicAttrKey,
13989
13982
  historicPoint: this.historicAttrDateTime,
13990
- historicFrom: this.historicAttrKey ? this.historicAttrDateTimeMin : null,
13991
- historicTo: this.historicAttrKey ? this.historicAttrDateTimeMax : null,
13992
13983
  filter: {
13993
13984
  pageSize: PAGE_SIZE,
13994
13985
  pageIndex: curCell.FetchPageIndex,
@@ -23512,7 +23503,7 @@ var ViewRenderEngine;
23512
23503
  ViewRenderEngine.Render = Render;
23513
23504
  })(ViewRenderEngine || (ViewRenderEngine = {}));
23514
23505
 
23515
- var VERSION = "3.7.8";
23506
+ var VERSION = "3.8.0";
23516
23507
 
23517
23508
  export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, Draw3dPolygon, Draw3dPolyline };
23518
23509
  //# sourceMappingURL=bruce-cesium.es5.js.map