bruce-cesium 4.5.4 → 4.5.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, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, Session, AbstractApi, EntityAttribute, EntityAttachment, EntityAttachmentType } 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, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, Session, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi } 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, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, DistanceDisplayCondition, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, 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, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect } from 'cesium';
3
+ import { Cartographic, JulianDate, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, Entity, DistanceDisplayCondition, HorizontalOrigin, VerticalOrigin, ConstantProperty, ConstantPositionProperty, ClassificationType, ArcType, CornerType, ShadowMode, Primitive, Cesium3DTileFeature, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, GeoJsonDataSource, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, CesiumInspector, defined, ClockRange, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, PolygonPipeline, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, Quaternion, ScreenSpaceEventHandler, ScreenSpaceEventType, CzmlDataSource, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2659,8 +2659,9 @@ var EntityUtils;
2659
2659
  getEntityPositions = function (sample) { return __awaiter(_this, void 0, void 0, function () {
2660
2660
  var entityId, entity, disallowRendered, evaluateRendered, evaluateRecord, renderedPosses, e_1, recordPosses, e_2, pos3d, eLocation, geometryRadius, sphere;
2661
2661
  var _this = this;
2662
- return __generator(this, function (_a) {
2663
- switch (_a.label) {
2662
+ var _a, _b;
2663
+ return __generator(this, function (_c) {
2664
+ switch (_c.label) {
2664
2665
  case 0:
2665
2666
  entityId = sample.entityId, entity = sample.entity, disallowRendered = sample.disallowRendered;
2666
2667
  evaluateRendered = function () { return __awaiter(_this, void 0, void 0, function () {
@@ -2898,18 +2899,18 @@ var EntityUtils;
2898
2899
  if (!(disallowRendered != true)) return [3 /*break*/, 2];
2899
2900
  return [4 /*yield*/, evaluateRendered()];
2900
2901
  case 1:
2901
- renderedPosses = _a.sent();
2902
+ renderedPosses = _c.sent();
2902
2903
  if (renderedPosses === null || renderedPosses === void 0 ? void 0 : renderedPosses.length) {
2903
2904
  return [2 /*return*/, renderedPosses];
2904
2905
  }
2905
- _a.label = 2;
2906
+ _c.label = 2;
2906
2907
  case 2:
2907
2908
  if (!!entity) return [3 /*break*/, 6];
2908
2909
  if (!(apiCalls < MAX_API_CALLS)) return [3 /*break*/, 6];
2909
2910
  apiCalls += 1;
2910
- _a.label = 3;
2911
+ _c.label = 3;
2911
2912
  case 3:
2912
- _a.trys.push([3, 5, , 6]);
2913
+ _c.trys.push([3, 5, , 6]);
2913
2914
  return [4 /*yield*/, Entity$1.Get({
2914
2915
  api: api,
2915
2916
  entityId: entityId,
@@ -2918,10 +2919,10 @@ var EntityUtils;
2918
2919
  migrated: true
2919
2920
  })];
2920
2921
  case 4:
2921
- entity = (_a.sent()).entity;
2922
+ entity = (_c.sent()).entity;
2922
2923
  return [3 /*break*/, 6];
2923
2924
  case 5:
2924
- e_1 = _a.sent();
2925
+ e_1 = _c.sent();
2925
2926
  console.error(e_1);
2926
2927
  return [3 /*break*/, 6];
2927
2928
  case 6:
@@ -2930,14 +2931,14 @@ var EntityUtils;
2930
2931
  }
2931
2932
  return [4 /*yield*/, evaluateRecord()];
2932
2933
  case 7:
2933
- recordPosses = _a.sent();
2934
+ recordPosses = _c.sent();
2934
2935
  if (recordPosses === null || recordPosses === void 0 ? void 0 : recordPosses.length) {
2935
2936
  return [2 /*return*/, recordPosses];
2936
2937
  }
2937
- if (!(apiCalls < MAX_API_CALLS)) return [3 /*break*/, 11];
2938
- _a.label = 8;
2938
+ if (!(apiCalls < MAX_API_CALLS && ((_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a.AssemblyRootLocation) == null)) return [3 /*break*/, 11];
2939
+ _c.label = 8;
2939
2940
  case 8:
2940
- _a.trys.push([8, 10, , 11]);
2941
+ _c.trys.push([8, 10, , 11]);
2941
2942
  apiCalls += 1;
2942
2943
  return [4 /*yield*/, Entity$1.Get({
2943
2944
  api: api,
@@ -2947,10 +2948,10 @@ var EntityUtils;
2947
2948
  migrated: true
2948
2949
  })];
2949
2950
  case 9:
2950
- entity = (_a.sent()).entity;
2951
+ entity = (_c.sent()).entity;
2951
2952
  return [3 /*break*/, 11];
2952
2953
  case 10:
2953
- e_2 = _a.sent();
2954
+ e_2 = _c.sent();
2954
2955
  console.warn(e_2);
2955
2956
  return [3 /*break*/, 11];
2956
2957
  case 11:
@@ -2959,13 +2960,13 @@ var EntityUtils;
2959
2960
  entity: entity,
2960
2961
  path: ["Bruce", "Location"]
2961
2962
  });
2962
- if (!(eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude)) return [3 /*break*/, 14];
2963
+ if (!((eLocation === null || eLocation === void 0 ? void 0 : eLocation.longitude) && ((_b = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _b === void 0 ? void 0 : _b.AssemblyRootLocation) != null)) return [3 /*break*/, 14];
2963
2964
  pos3d = Cartesian3.fromDegrees(EnsureNumber(eLocation.longitude), EnsureNumber(eLocation.latitude), EnsureNumber(eLocation.altitude));
2964
2965
  if (!(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) return [3 /*break*/, 13];
2965
2966
  return [4 /*yield*/, processPosHeight(pos3d, HeightReference.NONE)];
2966
2967
  case 12:
2967
- pos3d = _a.sent();
2968
- _a.label = 13;
2968
+ pos3d = _c.sent();
2969
+ _c.label = 13;
2969
2970
  case 13:
2970
2971
  geometryRadius = Entity$1.GetValue({
2971
2972
  entity: entity,
@@ -2979,7 +2980,7 @@ var EntityUtils;
2979
2980
  spheres.push(sphere);
2980
2981
  }
2981
2982
  }
2982
- _a.label = 14;
2983
+ _c.label = 14;
2983
2984
  case 14:
2984
2985
  if (pos3d) {
2985
2986
  return [2 /*return*/, [pos3d]];
@@ -20883,6 +20884,11 @@ var WidgetLeftPanelTabBookmarks = /** @class */ (function (_super) {
20883
20884
  _this._widget.Loading.then(function () {
20884
20885
  _this._updateBookmarks();
20885
20886
  });
20887
+ // In case another widget messed with the panel width.
20888
+ // Probably should just add a SetWidth method to avoid having plugins mess with the container CSS.
20889
+ if (_this.Container) {
20890
+ _this.Container.style.width = "300px";
20891
+ }
20886
20892
  return _this;
20887
20893
  }
20888
20894
  WidgetLeftPanelTabBookmarks.prototype.Dispose = function () {
@@ -27467,7 +27473,7 @@ var ViewerUtils;
27467
27473
  ViewerUtils.GetEventTracker = GetEventTracker;
27468
27474
  })(ViewerUtils || (ViewerUtils = {}));
27469
27475
 
27470
- var VERSION = "4.5.4";
27476
+ var VERSION = "4.5.6";
27471
27477
 
27472
27478
  export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, 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, WidgetSearchBar, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
27473
27479
  //# sourceMappingURL=bruce-cesium.es5.js.map