bruce-cesium 1.1.2 → 1.1.4

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,5 +1,5 @@
1
1
  import { BruceEvent, Cartes, Carto, Geometry, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, DelayQueue, Entity as Entity$1, BatchedDataGetter, EntityRelationType, ObjectUtils, Tileset, EntityCoords, EntityFilterGetter, EntitySource, EntityRelation, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera } from 'bruce-models';
2
- import { Cartesian2, Cartographic, Math as Math$1, Color, HeightReference, Cartesian3, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, Matrix4, Cesium3DTileStyle, Cesium3DTileset, IonResource, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, OrthographicFrustum, JulianDate, ColorMaterialProperty, Rectangle, Matrix3, EasingFunction, GeometryInstance, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, CallbackProperty, createOsmBuildings, KmlDataSource } from 'cesium';
2
+ import { Entity, Primitive, Cesium3DTileFeature, Color, Cartesian2, Cartographic, Math as Math$1, Cartesian3, OrthographicFrustum, JulianDate, createWorldTerrain, EllipsoidTerrainProvider, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, Cesium3DTileColorBlendMode, HeadingPitchRange, HeightReference, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, PolygonHierarchy, ShadowMode, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Matrix4, Cesium3DTileStyle, Cesium3DTileset, IonResource, EllipsoidGeodesic, sampleTerrainMostDetailed, ColorMaterialProperty, Rectangle, Matrix3, EasingFunction, GeometryInstance, PolygonPipeline, CallbackProperty, createOsmBuildings, KmlDataSource } from 'cesium';
3
3
 
4
4
  var TIME_LAG = 300;
5
5
  var POSITION_CHECK_TIMER = 950;
@@ -2864,14 +2864,14 @@ function removeEntity(viewer, visual) {
2864
2864
  }
2865
2865
  }
2866
2866
  }
2867
- function updateCEntityShow(viewer, visual, show) {
2868
- if (visual._parentEntity) {
2869
- updateCEntityShow(viewer, visual._parentEntity, show);
2867
+ function updateCEntityShow(viewer, visual, show, ignoreParent) {
2868
+ if (visual._parentEntity && !ignoreParent) {
2869
+ updateCEntityShow(viewer, visual._parentEntity, show, false);
2870
2870
  }
2871
2871
  if (visual._siblingGraphics) {
2872
2872
  for (var i = 0; i < visual._siblingGraphics.length; i++) {
2873
2873
  var sibling = visual._siblingGraphics[i];
2874
- updateCEntityShow(viewer, sibling, show);
2874
+ updateCEntityShow(viewer, sibling, show, true);
2875
2875
  }
2876
2876
  }
2877
2877
  if (viewer.entities.contains(visual)) {
@@ -2880,7 +2880,7 @@ function updateCEntityShow(viewer, visual, show) {
2880
2880
  }
2881
2881
  function updateEntityShow(viewer, visual, show) {
2882
2882
  if (visual instanceof Entity) {
2883
- updateCEntityShow(viewer, visual, show);
2883
+ updateCEntityShow(viewer, visual, show, false);
2884
2884
  }
2885
2885
  else if (visual instanceof Primitive) {
2886
2886
  if (viewer.scene.primitives.contains(visual)) {
@@ -3360,14 +3360,16 @@ var VisualsRegister;
3360
3360
  continue;
3361
3361
  }
3362
3362
  removeEntity(this.viewer, rego.visual);
3363
+ var doesInclude = this.rego[entityId_3].find(function (r) { return r.menuItemId === menuItemId; });
3364
+ if (doesInclude) {
3365
+ this.rego[entityId_3] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
3366
+ }
3363
3367
  (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({
3364
3368
  type: EVisualUpdateType.Remove,
3365
3369
  entityId: rego.entityId,
3366
3370
  rego: rego
3367
3371
  });
3368
- var doesInclude = this.rego[entityId_3].find(function (r) { return r.menuItemId === menuItemId; });
3369
3372
  if (doesInclude) {
3370
- this.rego[entityId_3] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
3371
3373
  updateEntity(this.viewer, entityId_3, this);
3372
3374
  }
3373
3375
  }
@@ -3413,12 +3415,12 @@ var VisualsRegister;
3413
3415
  continue;
3414
3416
  }
3415
3417
  removeEntity(this.viewer, rego.visual);
3418
+ this.rego[entityId_4] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
3416
3419
  (_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger({
3417
3420
  type: EVisualUpdateType.Remove,
3418
3421
  entityId: rego.entityId,
3419
3422
  rego: rego
3420
3423
  });
3421
- this.rego[entityId_4] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId; });
3422
3424
  if (doUpdate && menuItemId) {
3423
3425
  updateEntity(this.viewer, entityId_4, this);
3424
3426
  }