bruce-cesium 2.2.8 → 2.2.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.
@@ -1642,7 +1642,7 @@
1642
1642
  }
1643
1643
  function getStyle(api, entity, styleId) {
1644
1644
  return __awaiter(this, void 0, void 0, function () {
1645
- var style, type;
1645
+ var style, typeId, type;
1646
1646
  return __generator(this, function (_a) {
1647
1647
  switch (_a.label) {
1648
1648
  case 0:
@@ -1657,9 +1657,11 @@
1657
1657
  _a.label = 2;
1658
1658
  case 2:
1659
1659
  if (!!style) return [3 /*break*/, 5];
1660
+ typeId = entity.Bruce["EntityType.ID"];
1661
+ if (!typeId) return [3 /*break*/, 5];
1660
1662
  return [4 /*yield*/, bruceModels.EntityType.Get({
1661
1663
  api: api,
1662
- entityTypeId: entity.Bruce["EntityType.ID"]
1664
+ entityTypeId: typeId
1663
1665
  })];
1664
1666
  case 3:
1665
1667
  type = (_a.sent()).entityType;
@@ -3571,13 +3573,25 @@
3571
3573
  });
3572
3574
  Manager.prototype.Init = function (params) {
3573
3575
  var _this = this;
3574
- var _a, _b, _c, _d, _e, _f, _g;
3576
+ var _a, _b, _c, _d, _e, _f, _g, _h;
3575
3577
  if (this.disposed) {
3576
3578
  throw (new Error("This item is disposed."));
3577
3579
  }
3578
3580
  if (params === null || params === void 0 ? void 0 : params.item) {
3579
3581
  this.item = params.item;
3580
3582
  }
3583
+ if (!((_a = this.item.CameraZoomSettings) === null || _a === void 0 ? void 0 : _a.length)) {
3584
+ this.item.CameraZoomSettings = [
3585
+ {
3586
+ MinZoom: 0,
3587
+ MaxZoom: 100000,
3588
+ DisplayType: bruceModels.ZoomControl.EDisplayType.Model3D,
3589
+ LODCategoryID: "glb",
3590
+ LODLevel: 0,
3591
+ StyleID: 0
3592
+ }
3593
+ ];
3594
+ }
3581
3595
  var isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
3582
3596
  var tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
3583
3597
  if (!tagsToRender) {
@@ -3585,13 +3599,13 @@
3585
3599
  }
3586
3600
  tagsToRender = [].concat(tagsToRender);
3587
3601
  var shouldRender = !isTagItem || tagsToRender.length > 0;
3588
- (_a = this.getter) === null || _a === void 0 ? void 0 : _a.ExcludeMenuItem(this.item.id);
3602
+ (_b = this.getter) === null || _b === void 0 ? void 0 : _b.ExcludeMenuItem(this.item.id);
3589
3603
  this.getter = null;
3590
- (_b = this.getterSub) === null || _b === void 0 ? void 0 : _b.call(this);
3604
+ (_c = this.getterSub) === null || _c === void 0 ? void 0 : _c.call(this);
3591
3605
  this.getterSub = null;
3592
- (_c = this.viewMonitorRemoval) === null || _c === void 0 ? void 0 : _c.call(this);
3606
+ (_d = this.viewMonitorRemoval) === null || _d === void 0 ? void 0 : _d.call(this);
3593
3607
  this.viewMonitorRemoval = null;
3594
- (_d = this.entityCheckQueue) === null || _d === void 0 ? void 0 : _d.Dispose();
3608
+ (_e = this.entityCheckQueue) === null || _e === void 0 ? void 0 : _e.Dispose();
3595
3609
  this.entityCheckQueue = null;
3596
3610
  clearInterval(this.renderQueueInterval);
3597
3611
  this.renderQueueInterval = null;
@@ -3603,13 +3617,13 @@
3603
3617
  menuItemId: this.item.id,
3604
3618
  retainTagIds: tagsToRender
3605
3619
  });
3606
- (_e = this.clustering) === null || _e === void 0 ? void 0 : _e.Dispose();
3620
+ (_f = this.clustering) === null || _f === void 0 ? void 0 : _f.Dispose();
3607
3621
  }
3608
3622
  else {
3609
3623
  this.visualsManager.RemoveRegos({
3610
3624
  menuItemId: this.item.id
3611
3625
  });
3612
- (_f = this.clustering) === null || _f === void 0 ? void 0 : _f.Dispose();
3626
+ (_g = this.clustering) === null || _g === void 0 ? void 0 : _g.Dispose();
3613
3627
  return;
3614
3628
  }
3615
3629
  if (this.item.enableClustering) {
@@ -3618,7 +3632,7 @@
3618
3632
  var api = this.apiGetter.getApi();
3619
3633
  this.getter = this.sharedGetters.GetOrCreateFilterGetter({
3620
3634
  api: api,
3621
- attrFilter: (_g = this.item.BruceEntity.Filter) !== null && _g !== void 0 ? _g : {},
3635
+ attrFilter: (_h = this.item.BruceEntity.Filter) !== null && _h !== void 0 ? _h : {},
3622
3636
  batchSize: BATCH_SIZE,
3623
3637
  typeId: this.item.BruceEntity["EntityType.ID"],
3624
3638
  monitor: this.monitor,
@@ -3922,9 +3936,22 @@
3922
3936
  });
3923
3937
  Manager.prototype.Init = function () {
3924
3938
  var _this = this;
3939
+ var _a;
3925
3940
  if (this.disposed) {
3926
3941
  throw (new Error("This item is disposed."));
3927
3942
  }
3943
+ if (!((_a = this.item.CameraZoomSettings) === null || _a === void 0 ? void 0 : _a.length)) {
3944
+ this.item.CameraZoomSettings = [
3945
+ {
3946
+ MinZoom: 0,
3947
+ MaxZoom: 100000,
3948
+ DisplayType: bruceModels.ZoomControl.EDisplayType.Model3D,
3949
+ LODCategoryID: "glb",
3950
+ LODLevel: 0,
3951
+ StyleID: 0
3952
+ }
3953
+ ];
3954
+ }
3928
3955
  this.getter = new bruceModels.BatchedDataGetter.Getter(this.item.BruceEntity.Entities, this.monitor, BATCH_SIZE$1);
3929
3956
  this.getterSub = this.getter.OnUpdate.Subscribe(function (entities) {
3930
3957
  var _a;
@@ -5507,9 +5534,22 @@
5507
5534
  });
5508
5535
  Manager.prototype.Init = function () {
5509
5536
  var _this = this;
5537
+ var _a;
5510
5538
  if (this.disposed) {
5511
5539
  throw (new Error("This item is disposed."));
5512
5540
  }
5541
+ if (!((_a = this.item.CameraZoomSettings) === null || _a === void 0 ? void 0 : _a.length)) {
5542
+ this.item.CameraZoomSettings = [
5543
+ {
5544
+ MinZoom: 0,
5545
+ MaxZoom: 100000,
5546
+ DisplayType: bruceModels.ZoomControl.EDisplayType.Model3D,
5547
+ LODCategoryID: "glb",
5548
+ LODLevel: 0,
5549
+ StyleID: 0
5550
+ }
5551
+ ];
5552
+ }
5513
5553
  this.getter = new bruceModels.BatchedDataGetter.Getter(this.item.BruceEntity.EntityIds, this.monitor, BATCH_SIZE$2);
5514
5554
  this.getterSub = this.getter.OnUpdate.Subscribe(function (ids) {
5515
5555
  _this.onGetterUpdate(ids);
@@ -5691,9 +5731,22 @@
5691
5731
  });
5692
5732
  Manager.prototype.Init = function () {
5693
5733
  var _this = this;
5734
+ var _a;
5694
5735
  if (this.disposed) {
5695
5736
  throw (new Error("This item is disposed."));
5696
5737
  }
5738
+ if (!((_a = this.item.CameraZoomSettings) === null || _a === void 0 ? void 0 : _a.length)) {
5739
+ this.item.CameraZoomSettings = [
5740
+ {
5741
+ MinZoom: 0,
5742
+ MaxZoom: 100000,
5743
+ DisplayType: bruceModels.ZoomControl.EDisplayType.Model3D,
5744
+ LODCategoryID: "glb",
5745
+ LODLevel: 0,
5746
+ StyleID: 0
5747
+ }
5748
+ ];
5749
+ }
5697
5750
  this.getter = new bruceModels.BatchedDataGetter.Getter([this.item.BruceEntity.EntityId], this.monitor, 1);
5698
5751
  this.getterSub = this.getter.OnUpdate.Subscribe(function (ids) {
5699
5752
  _this.onGetterUpdate(ids[0]);
@@ -8916,7 +8969,7 @@
8916
8969
  case 1:
8917
8970
  if (!(i < menuItems.length)) return [3 /*break*/, 4];
8918
8971
  menuItem = menuItems[i];
8919
- return [4 /*yield*/, params.manager.RenderItem({
8972
+ return [4 /*yield*/, manager.RenderItem({
8920
8973
  apiGetter: apiGetter,
8921
8974
  item: menuItem
8922
8975
  })];
@@ -14134,7 +14187,7 @@
14134
14187
  ViewerUtils.CreateWidgets = CreateWidgets;
14135
14188
  })(exports.ViewerUtils || (exports.ViewerUtils = {}));
14136
14189
 
14137
- var VERSION$1 = "2.2.8";
14190
+ var VERSION$1 = "2.2.9";
14138
14191
 
14139
14192
  exports.VERSION = VERSION$1;
14140
14193
  exports.CesiumViewMonitor = CesiumViewMonitor;