bruce-cesium 3.5.7 → 3.5.9

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, Entity, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, ColorMaterialProperty, DistanceDisplayCondition, NearFarScalar, Model, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, CesiumInspector, defined, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, BoundingSphere, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect } from 'cesium';
3
+ import { Cartographic, JulianDate, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, ColorMaterialProperty, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, EasingFunction, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, defined, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -11605,6 +11605,9 @@ var TilesetRenderEngine;
11605
11605
  this.styleMappingsLoaded = {};
11606
11606
  this.fallbackStyle = null;
11607
11607
  this.loadingCounter = 0;
11608
+ // Dictionary of Entity ID -> boolean to indicate which Entities have been styled.
11609
+ // This is used to determine if the Style colour needs to be overriden or not.
11610
+ this.styledEntityIds = {};
11608
11611
  this.runningQueues = 0;
11609
11612
  this.recordLoadQueue = [];
11610
11613
  this.recordCheckQueue = [];
@@ -11688,11 +11691,12 @@ var TilesetRenderEngine;
11688
11691
  }
11689
11692
  };
11690
11693
  Styler.prototype.processQueue = function () {
11694
+ var _a, _b;
11691
11695
  return __awaiter(this, void 0, void 0, function () {
11692
- var MAX_BATCHES, BATCH_DELAY, batch, rerun, entities, _loop_1, this_1, i;
11696
+ var MAX_BATCHES, BATCH_DELAY, batch, rerun, entities, tagIds, i, entity, eTagIds, j, tags, _loop_1, this_1, i;
11693
11697
  var _this = this;
11694
- return __generator(this, function (_a) {
11695
- switch (_a.label) {
11698
+ return __generator(this, function (_c) {
11699
+ switch (_c.label) {
11696
11700
  case 0:
11697
11701
  MAX_BATCHES = 2;
11698
11702
  BATCH_DELAY = 200;
@@ -11705,23 +11709,48 @@ var TilesetRenderEngine;
11705
11709
  this.runningQueues += 1;
11706
11710
  batch = [];
11707
11711
  rerun = false;
11708
- _a.label = 1;
11712
+ _c.label = 1;
11709
11713
  case 1:
11710
- _a.trys.push([1, , 4, 5]);
11714
+ _c.trys.push([1, , 6, 7]);
11711
11715
  batch = this.getEntityIdsForQueue();
11712
- if (!(batch.length > 0)) return [3 /*break*/, 3];
11716
+ if (!(batch.length > 0)) return [3 /*break*/, 5];
11713
11717
  return [4 /*yield*/, Entity$1.GetListByIds({
11714
11718
  api: this.api,
11715
11719
  entityIds: batch
11716
11720
  })];
11717
11721
  case 2:
11718
- entities = (_a.sent()).entities;
11722
+ entities = (_c.sent()).entities;
11723
+ tagIds = [];
11724
+ for (i = 0; i < entities.length; i++) {
11725
+ entity = entities[i];
11726
+ if ((_b = (_a = entity === null || entity === void 0 ? void 0 : entity.Bruce) === null || _a === void 0 ? void 0 : _a["Layer.ID"]) === null || _b === void 0 ? void 0 : _b.length) {
11727
+ eTagIds = entity.Bruce["Layer.ID"];
11728
+ for (j = 0; j < eTagIds.length; j++) {
11729
+ tagIds.push(eTagIds[j]);
11730
+ }
11731
+ }
11732
+ }
11733
+ // Turn into unique list.
11734
+ if (tagIds.length) {
11735
+ tagIds = tagIds.filter(function (v, i, a) { return a.indexOf(v) === i; });
11736
+ }
11737
+ tags = [];
11738
+ if (!tagIds.length) return [3 /*break*/, 4];
11739
+ return [4 /*yield*/, EntityTag.GetListByIds({
11740
+ tagIds: tagIds,
11741
+ api: this.api
11742
+ })];
11743
+ case 3:
11744
+ tags = (_c.sent()).tags;
11745
+ _c.label = 4;
11746
+ case 4:
11719
11747
  _loop_1 = function (i) {
11720
11748
  var entityId = batch[i];
11721
11749
  var record = entities.find(function (e) { var _a; return ((_a = e.Bruce) === null || _a === void 0 ? void 0 : _a.ID) == entityId; });
11722
11750
  var feature = this_1.getEntityRego(entityId);
11723
11751
  if (feature) {
11724
- this_1.styleTilesetFeatureFullData(feature, record);
11752
+ var eTags = tags.filter(function (t) { var _a, _b, _c, _d; return ((_b = (_a = record === null || record === void 0 ? void 0 : record.Bruce) === null || _a === void 0 ? void 0 : _a["Layer.ID"]) === null || _b === void 0 ? void 0 : _b.length) && ((_d = (_c = record === null || record === void 0 ? void 0 : record.Bruce) === null || _c === void 0 ? void 0 : _c["Layer.ID"]) === null || _d === void 0 ? void 0 : _d.includes(t.ID)); });
11753
+ this_1.styleTilesetFeatureFullData(feature, record, eTags);
11725
11754
  }
11726
11755
  };
11727
11756
  this_1 = this;
@@ -11730,9 +11759,9 @@ var TilesetRenderEngine;
11730
11759
  }
11731
11760
  rerun = batch.length > 0;
11732
11761
  this.viewer.scene.requestRender();
11733
- _a.label = 3;
11734
- case 3: return [3 /*break*/, 5];
11735
- case 4:
11762
+ _c.label = 5;
11763
+ case 5: return [3 /*break*/, 7];
11764
+ case 6:
11736
11765
  setTimeout(function () {
11737
11766
  _this.runningQueues -= 1;
11738
11767
  if (rerun || _this.recordLoadQueue.length > 0) {
@@ -11740,7 +11769,7 @@ var TilesetRenderEngine;
11740
11769
  }
11741
11770
  }, BATCH_DELAY);
11742
11771
  return [7 /*endfinally*/];
11743
- case 5:
11772
+ case 7:
11744
11773
  this.viewer.scene.requestRender();
11745
11774
  return [2 /*return*/];
11746
11775
  }
@@ -12011,16 +12040,16 @@ var TilesetRenderEngine;
12011
12040
  }
12012
12041
  };
12013
12042
  Styler.prototype.styleTilesetFeature = function (entity) {
12014
- this.styleTilesetFeatureFullData(entity, null);
12043
+ this.styleTilesetFeatureFullData(entity, null, []);
12015
12044
  };
12016
- Styler.prototype.styleTilesetFeatureFullData = function (entity, data) {
12045
+ Styler.prototype.styleTilesetFeatureFullData = function (entity, data, tags) {
12017
12046
  var _a;
12018
12047
  var visual = entity.visual;
12019
12048
  if (!visual || !(visual instanceof Cesium3DTileFeature)) {
12020
12049
  return;
12021
12050
  }
12022
12051
  var style = this.getTilesetFeatureStyle(entity.entityId, entity.entityTypeId);
12023
- var bColor = style && ((_a = style.modelStyle) === null || _a === void 0 ? void 0 : _a.fillColor) ? Calculator.GetColor(style.modelStyle.fillColor, data, []) : null;
12052
+ var bColor = style && ((_a = style.modelStyle) === null || _a === void 0 ? void 0 : _a.fillColor) ? Calculator.GetColor(style.modelStyle.fillColor, data, tags) : null;
12024
12053
  var cColor = null;
12025
12054
  if (bColor == null) {
12026
12055
  cColor = Color.WHITE;
@@ -12032,8 +12061,9 @@ var TilesetRenderEngine;
12032
12061
  color: cColor,
12033
12062
  entity: visual,
12034
12063
  viewer: this.viewer,
12035
- override: false
12064
+ override: this.styledEntityIds[entity.entityId] == true
12036
12065
  });
12066
+ this.styledEntityIds[entity.entityId] = true;
12037
12067
  };
12038
12068
  Styler.prototype.getTilesetFeatureStyle = function (entityId, entityTypeId) {
12039
12069
  var _a, _b, _c, _d;
@@ -19412,9 +19442,6 @@ var MenuItemCreator;
19412
19442
  _d.label = 6;
19413
19443
  case 6:
19414
19444
  bookmark = _c;
19415
- if (view.DataVersion != bookmark.DataVersion) {
19416
- console.warn("View and bookmark settings version mismatch.");
19417
- }
19418
19445
  enabledIds = [];
19419
19446
  menuItems = [];
19420
19447
  version = view.DataVersion;
@@ -21093,58 +21120,58 @@ function renderLegacyNavigator(iteration, params, bookmark, view) {
21093
21120
  * @param view
21094
21121
  */
21095
21122
  function renderNavigator(iteration, params, bookmark, view, getters) {
21096
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
21123
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5;
21097
21124
  return __awaiter(this, void 0, void 0, function () {
21098
- var viewer, scene, cTokenSet, _7, programKey, valid, e_1, valid, vSettings, bSettings, defaults, camera, newLens, shouldBe2d, curIs2d, transition, pos, terrain, hillShades, baseColor, globeHidden, terrainWireframe, globeAlpha, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, selectedIds, hiddenIds, isolatedIds, labelledIds, curLabelledIds, toUnLabel, entityOpacityMap, entityId, opacity, imagery, i, layer, legacyRelationIds, relations, curEnabled, newItemIds, _i, curEnabled_1, id, shouldRemove, rendered, menuItem, menuItem, gOcclusion;
21099
- return __generator(this, function (_8) {
21100
- switch (_8.label) {
21125
+ var viewer, scene, cTokenSet, _6, programKey, valid, e_1, valid, vSettings, bSettings, defaults, camera, newLens, shouldBe2d, curIs2d, transition, pos, terrain, hillShades, baseColor, globeHidden, terrainWireframe, globeAlpha, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, selectedIds, hiddenIds, isolatedIds, labelledIds, curLabelledIds, toUnLabel, entityOpacityMap, entityId, opacity, imagery, i, layer, legacyRelationIds, relations, curEnabled, newItemIds, _i, curEnabled_1, id, shouldRemove, rendered, menuItem, menuItem, gOcclusion;
21126
+ return __generator(this, function (_7) {
21127
+ switch (_7.label) {
21101
21128
  case 0:
21102
21129
  viewer = params.manager.Viewer;
21103
21130
  scene = viewer.scene;
21104
21131
  if (!Ion.defaultAccessToken) return [3 /*break*/, 2];
21105
21132
  return [4 /*yield*/, ViewerUtils.AssertIonToken(Ion.defaultAccessToken)];
21106
21133
  case 1:
21107
- _7 = _8.sent();
21134
+ _6 = _7.sent();
21108
21135
  return [3 /*break*/, 3];
21109
21136
  case 2:
21110
- _7 = false;
21111
- _8.label = 3;
21137
+ _6 = false;
21138
+ _7.label = 3;
21112
21139
  case 3:
21113
- cTokenSet = _7;
21140
+ cTokenSet = _6;
21114
21141
  if (!!cTokenSet) return [3 /*break*/, 9];
21115
- _8.label = 4;
21142
+ _7.label = 4;
21116
21143
  case 4:
21117
- _8.trys.push([4, 8, , 9]);
21144
+ _7.trys.push([4, 8, , 9]);
21118
21145
  return [4 /*yield*/, ProgramKey.Get({
21119
21146
  programId: ProgramKey.EProgramId.CesiumIon,
21120
21147
  api: getters.GetBruceApi()
21121
21148
  })];
21122
21149
  case 5:
21123
- programKey = (_8.sent()).programKey;
21150
+ programKey = (_7.sent()).programKey;
21124
21151
  if (!(programKey === null || programKey === void 0 ? void 0 : programKey.Key)) return [3 /*break*/, 7];
21125
21152
  return [4 /*yield*/, ViewerUtils.AssertIonToken(programKey.Key)];
21126
21153
  case 6:
21127
- valid = _8.sent();
21154
+ valid = _7.sent();
21128
21155
  if (valid) {
21129
21156
  Ion.defaultAccessToken = programKey.Key;
21130
21157
  cTokenSet = true;
21131
21158
  }
21132
- _8.label = 7;
21159
+ _7.label = 7;
21133
21160
  case 7: return [3 /*break*/, 9];
21134
21161
  case 8:
21135
- e_1 = _8.sent();
21162
+ e_1 = _7.sent();
21136
21163
  console.error(e_1);
21137
21164
  return [3 /*break*/, 9];
21138
21165
  case 9:
21139
21166
  if (!!cTokenSet) return [3 /*break*/, 11];
21140
21167
  return [4 /*yield*/, ViewerUtils.AssertIonToken(CESIUM_DEFAULT_TOKEN)];
21141
21168
  case 10:
21142
- valid = _8.sent();
21169
+ valid = _7.sent();
21143
21170
  if (valid) {
21144
21171
  Ion.defaultAccessToken = CESIUM_DEFAULT_TOKEN;
21145
21172
  cTokenSet = true;
21146
21173
  }
21147
- _8.label = 11;
21174
+ _7.label = 11;
21148
21175
  case 11:
21149
21176
  vSettings = view.Settings;
21150
21177
  bSettings = ((_a = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Settings) !== null && _a !== void 0 ? _a : {});
@@ -21212,15 +21239,15 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21212
21239
  viewer: params.manager.Viewer,
21213
21240
  })];
21214
21241
  case 12:
21215
- _8.sent();
21242
+ _7.sent();
21216
21243
  if (!assertIteration$1(params.viewer, iteration)) {
21217
21244
  return [2 /*return*/];
21218
21245
  }
21219
- _8.label = 13;
21246
+ _7.label = 13;
21220
21247
  case 13:
21221
- hillShades = (_o = bookmark === null || bookmark === void 0 ? void 0 : bookmark.Settings) === null || _o === void 0 ? void 0 : _o.hillShades;
21248
+ hillShades = bSettings === null || bSettings === void 0 ? void 0 : bSettings.hillShades;
21222
21249
  if (hillShades == null) {
21223
- hillShades = (_p = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _p === void 0 ? void 0 : _p.hillShades;
21250
+ hillShades = (_o = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _o === void 0 ? void 0 : _o.hillShades;
21224
21251
  }
21225
21252
  if (hillShades == null) {
21226
21253
  hillShades = true;
@@ -21228,7 +21255,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21228
21255
  scene.globe.enableLighting = Boolean(hillShades);
21229
21256
  baseColor = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeColor;
21230
21257
  if (baseColor == null) {
21231
- baseColor = (_q = defaults.settings) === null || _q === void 0 ? void 0 : _q.globeColor;
21258
+ baseColor = (_p = defaults.settings) === null || _p === void 0 ? void 0 : _p.globeColor;
21232
21259
  }
21233
21260
  if (baseColor == null) {
21234
21261
  // TODO: Need global default.
@@ -21237,7 +21264,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21237
21264
  scene.globe.baseColor = Color.fromCssColorString(baseColor);
21238
21265
  globeHidden = bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeHidden;
21239
21266
  if (globeHidden == null) {
21240
- globeHidden = (_r = defaults.settings) === null || _r === void 0 ? void 0 : _r.globeHidden;
21267
+ globeHidden = (_q = defaults.settings) === null || _q === void 0 ? void 0 : _q.globeHidden;
21241
21268
  }
21242
21269
  if (globeHidden == null) {
21243
21270
  globeHidden = false;
@@ -21245,7 +21272,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21245
21272
  scene.globe.show = !globeHidden;
21246
21273
  terrainWireframe = bSettings === null || bSettings === void 0 ? void 0 : bSettings.terrainWireframe;
21247
21274
  if (terrainWireframe == null) {
21248
- terrainWireframe = (_s = defaults.settings) === null || _s === void 0 ? void 0 : _s.terrainWireframe;
21275
+ terrainWireframe = (_r = defaults.settings) === null || _r === void 0 ? void 0 : _r.terrainWireframe;
21249
21276
  }
21250
21277
  if (terrainWireframe == null) {
21251
21278
  terrainWireframe = false;
@@ -21256,7 +21283,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21256
21283
  });
21257
21284
  globeAlpha = +(bSettings === null || bSettings === void 0 ? void 0 : bSettings.globeAlpha);
21258
21285
  if (isNaN(globeAlpha)) {
21259
- globeAlpha = +((_t = defaults.settings) === null || _t === void 0 ? void 0 : _t.globeAlpha);
21286
+ globeAlpha = +((_s = defaults.settings) === null || _s === void 0 ? void 0 : _s.globeAlpha);
21260
21287
  }
21261
21288
  if (!scene.globe.translucency.enabled) {
21262
21289
  scene.globe.translucency.enabled = true;
@@ -21266,7 +21293,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21266
21293
  scene.globe.translucency.frontFaceAlphaByDistance.nearValue = EnsureNumber(globeAlpha, 1);
21267
21294
  shadows = bSettings === null || bSettings === void 0 ? void 0 : bSettings.shadows;
21268
21295
  if (shadows == null) {
21269
- shadows = (_u = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _u === void 0 ? void 0 : _u.shadows;
21296
+ shadows = (_t = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _t === void 0 ? void 0 : _t.shadows;
21270
21297
  }
21271
21298
  if (shadows == null) {
21272
21299
  shadows = {
@@ -21287,7 +21314,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21287
21314
  viewer.shadowMap.darkness = EnsureNumber(shadows.darkness, 0.3);
21288
21315
  ambientOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.ambientOcclusion;
21289
21316
  if (ambientOcclusion == null) {
21290
- ambientOcclusion = (_v = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _v === void 0 ? void 0 : _v.ambientOcclusion;
21317
+ ambientOcclusion = (_u = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _u === void 0 ? void 0 : _u.ambientOcclusion;
21291
21318
  }
21292
21319
  if (ambientOcclusion == null) {
21293
21320
  ambientOcclusion = {
@@ -21310,7 +21337,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21310
21337
  }
21311
21338
  lighting = bSettings === null || bSettings === void 0 ? void 0 : bSettings.lighting;
21312
21339
  if (lighting == null) {
21313
- lighting = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.lighting;
21340
+ lighting = (_v = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _v === void 0 ? void 0 : _v.lighting;
21314
21341
  }
21315
21342
  if (lighting == null) {
21316
21343
  lighting = {
@@ -21325,7 +21352,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21325
21352
  }
21326
21353
  quality = bSettings === null || bSettings === void 0 ? void 0 : bSettings.quality;
21327
21354
  if (quality == null) {
21328
- quality = (_x = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _x === void 0 ? void 0 : _x.quality;
21355
+ quality = (_w = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _w === void 0 ? void 0 : _w.quality;
21329
21356
  }
21330
21357
  if (quality == null) {
21331
21358
  quality = {
@@ -21336,7 +21363,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21336
21363
  fxaa.enabled = Boolean(quality.fxaa);
21337
21364
  dateTime = bSettings === null || bSettings === void 0 ? void 0 : bSettings.dateTime;
21338
21365
  if (dateTime == null) {
21339
- dateTime = (_y = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _y === void 0 ? void 0 : _y.dateTime;
21366
+ dateTime = (_x = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _x === void 0 ? void 0 : _x.dateTime;
21340
21367
  }
21341
21368
  if (dateTime != null) {
21342
21369
  clock = viewer.clock;
@@ -21344,7 +21371,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21344
21371
  }
21345
21372
  selectedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.selectedEntityIds;
21346
21373
  if (selectedIds == null) {
21347
- selectedIds = (_z = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _z === void 0 ? void 0 : _z.selectedEntityIds;
21374
+ selectedIds = (_y = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _y === void 0 ? void 0 : _y.selectedEntityIds;
21348
21375
  }
21349
21376
  if (selectedIds != null) {
21350
21377
  params.manager.VisualsRegister.ClearSelected();
@@ -21358,7 +21385,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21358
21385
  params.manager.VisualsRegister.ClearHidden();
21359
21386
  hiddenIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.hiddenEntityIds;
21360
21387
  if (hiddenIds == null) {
21361
- hiddenIds = (_0 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _0 === void 0 ? void 0 : _0.hiddenEntityIds;
21388
+ hiddenIds = (_z = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _z === void 0 ? void 0 : _z.hiddenEntityIds;
21362
21389
  }
21363
21390
  if (hiddenIds != null) {
21364
21391
  params.manager.VisualsRegister.SetHidden({
@@ -21370,7 +21397,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21370
21397
  params.manager.VisualsRegister.ClearIsolated();
21371
21398
  isolatedIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.isolatedEntityIds;
21372
21399
  if (isolatedIds == null) {
21373
- isolatedIds = (_1 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _1 === void 0 ? void 0 : _1.isolatedEntityIds;
21400
+ isolatedIds = (_0 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _0 === void 0 ? void 0 : _0.isolatedEntityIds;
21374
21401
  }
21375
21402
  if (isolatedIds != null) {
21376
21403
  params.manager.VisualsRegister.SetIsolated({
@@ -21381,7 +21408,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21381
21408
  }
21382
21409
  labelledIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.labelledEntityIds;
21383
21410
  if (labelledIds == null) {
21384
- labelledIds = (_2 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _2 === void 0 ? void 0 : _2.labelledEntityIds;
21411
+ labelledIds = (_1 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _1 === void 0 ? void 0 : _1.labelledEntityIds;
21385
21412
  }
21386
21413
  if (!(labelledIds === null || labelledIds === void 0 ? void 0 : labelledIds.length)) {
21387
21414
  params.manager.VisualsRegister.ClearLabelled({
@@ -21405,7 +21432,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21405
21432
  params.manager.VisualsRegister.ClearOpacity();
21406
21433
  entityOpacityMap = bSettings === null || bSettings === void 0 ? void 0 : bSettings.entityOpacityMap;
21407
21434
  if (entityOpacityMap == null) {
21408
- entityOpacityMap = (_3 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _3 === void 0 ? void 0 : _3.entityOpacityMap;
21435
+ entityOpacityMap = (_2 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _2 === void 0 ? void 0 : _2.entityOpacityMap;
21409
21436
  }
21410
21437
  if (entityOpacityMap != null) {
21411
21438
  for (entityId in entityOpacityMap) {
@@ -21419,7 +21446,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21419
21446
  }
21420
21447
  }
21421
21448
  }
21422
- imagery = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.imagery) != null ? bSettings.imagery : (_4 = defaults.settings) === null || _4 === void 0 ? void 0 : _4.imagery;
21449
+ imagery = (bSettings === null || bSettings === void 0 ? void 0 : bSettings.imagery) != null ? bSettings.imagery : (_3 = defaults.settings) === null || _3 === void 0 ? void 0 : _3.imagery;
21423
21450
  if (imagery == null) {
21424
21451
  // TODO: Need global default.
21425
21452
  imagery = [
@@ -21474,7 +21501,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21474
21501
  }
21475
21502
  viewer.scene.requestRender();
21476
21503
  curEnabled = params.manager.GetEnabledItemIds();
21477
- newItemIds = (_5 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _5 !== void 0 ? _5 : [];
21504
+ newItemIds = (_4 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _4 !== void 0 ? _4 : [];
21478
21505
  for (_i = 0, curEnabled_1 = curEnabled; _i < curEnabled_1.length; _i++) {
21479
21506
  id = curEnabled_1[_i];
21480
21507
  shouldRemove = void 0;
@@ -21510,11 +21537,11 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21510
21537
  bookmark: bookmark
21511
21538
  })];
21512
21539
  case 14:
21513
- _8.sent();
21540
+ _7.sent();
21514
21541
  if (!assertIteration$1(params.viewer, iteration)) {
21515
21542
  return [2 /*return*/];
21516
21543
  }
21517
- _8.label = 15;
21544
+ _7.label = 15;
21518
21545
  case 15:
21519
21546
  if (legacyRelationIds.length || relations.length) {
21520
21547
  if (relations.length) {
@@ -21549,7 +21576,7 @@ function renderNavigator(iteration, params, bookmark, view, getters) {
21549
21576
  }
21550
21577
  gOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.groundOcclusion;
21551
21578
  if (gOcclusion == null) {
21552
- gOcclusion = (_6 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _6 === void 0 ? void 0 : _6.groundOcclusion;
21579
+ gOcclusion = (_5 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _5 === void 0 ? void 0 : _5.groundOcclusion;
21553
21580
  }
21554
21581
  if (gOcclusion == null) {
21555
21582
  // TODO: Need global default.
@@ -21654,7 +21681,7 @@ var ViewRenderEngine;
21654
21681
  ViewRenderEngine.Render = Render;
21655
21682
  })(ViewRenderEngine || (ViewRenderEngine = {}));
21656
21683
 
21657
- var VERSION = "3.5.7";
21684
+ var VERSION = "3.5.9";
21658
21685
 
21659
21686
  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, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, Draw3dPolygon, Draw3dPolyline };
21660
21687
  //# sourceMappingURL=bruce-cesium.es5.js.map