bruce-cesium 2.8.6 → 2.8.7

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.
@@ -3796,12 +3796,12 @@
3796
3796
  * @param starterPos3d optional position to create label at. Ignored for billboard labels.
3797
3797
  */
3798
3798
  Label.prototype.createLabel = function (starterPos3d) {
3799
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
3799
+ var _a, _b, _c, _d, _e, _f, _g;
3800
3800
  return __awaiter(this, void 0, void 0, function () {
3801
3801
  var pos3d, counter, sizeInM, heightRef, pixelOffset, visual, hierarchy, posses, centerIndex, pos1, pos2, pos3, posses, isClamped, centerIndex, size, height, scale, posses, centerIndex, text, type, e_1, ele, _lastDistance, _lastCameraPos, getDistance, MAX_DISTANCE, updateLabel, terrTimeout;
3802
3802
  var _this = this;
3803
- return __generator(this, function (_l) {
3804
- switch (_l.label) {
3803
+ return __generator(this, function (_h) {
3804
+ switch (_h.label) {
3805
3805
  case 0:
3806
3806
  pos3d = starterPos3d ? starterPos3d.clone() : null;
3807
3807
  counter = ++this.counter;
@@ -3941,12 +3941,12 @@
3941
3941
  visualRegister: this.visualRegister
3942
3942
  })];
3943
3943
  case 1:
3944
- pos3d = _l.sent();
3944
+ pos3d = _h.sent();
3945
3945
  heightRef = Cesium.HeightReference.NONE;
3946
3946
  if (this.counter != counter) {
3947
3947
  return [2 /*return*/];
3948
3948
  }
3949
- _l.label = 2;
3949
+ _h.label = 2;
3950
3950
  case 2:
3951
3951
  if (isNaN(pos3d === null || pos3d === void 0 ? void 0 : pos3d.x)) {
3952
3952
  return [2 /*return*/];
@@ -3962,37 +3962,44 @@
3962
3962
  }
3963
3963
  this._pos3d = pos3d;
3964
3964
  text = "Unknown Entity";
3965
- if (!((_h = this.rego) === null || _h === void 0 ? void 0 : _h.relation)) return [3 /*break*/, 7];
3965
+ if (!this.rego) return [3 /*break*/, 8];
3966
+ if (!this.rego.relation) return [3 /*break*/, 7];
3966
3967
  type = this.rego.relation.RelationType;
3967
- if (!(!type && this.rego.relation["Related.Entity.ID"])) return [3 /*break*/, 6];
3968
- _l.label = 3;
3968
+ if (!(!type && this.rego.relation["Relation.Type.ID"])) return [3 /*break*/, 6];
3969
+ _h.label = 3;
3969
3970
  case 3:
3970
- _l.trys.push([3, 5, , 6]);
3971
+ _h.trys.push([3, 5, , 6]);
3971
3972
  return [4 /*yield*/, bruceModels.EntityRelationType.Get({
3972
3973
  api: this.api,
3973
- relationTypeId: this.rego.relation["Related.Entity.ID"]
3974
+ relationTypeId: this.rego.relation["Relation.Type.ID"]
3974
3975
  })];
3975
3976
  case 4:
3976
- type = (_j = (_l.sent())) === null || _j === void 0 ? void 0 : _j.relationType;
3977
+ type = (_h.sent()).relationType;
3977
3978
  return [3 /*break*/, 6];
3978
3979
  case 5:
3979
- e_1 = _l.sent();
3980
+ e_1 = _h.sent();
3980
3981
  console.error(e_1);
3981
3982
  return [3 /*break*/, 6];
3982
3983
  case 6:
3983
3984
  if (type) {
3984
3985
  text = type.Name ? type.Name : (type.ForwardName + "/" + type.ReverseName);
3985
3986
  }
3987
+ else {
3988
+ text = "Unknown Relationship";
3989
+ }
3986
3990
  return [3 /*break*/, 8];
3987
3991
  case 7:
3988
- if ((_k = this.rego) === null || _k === void 0 ? void 0 : _k.name) {
3992
+ if (this.rego.name) {
3989
3993
  text = this.rego.name;
3990
3994
  }
3991
3995
  else {
3992
3996
  text = "Unnamed Entity";
3993
3997
  }
3994
- _l.label = 8;
3998
+ _h.label = 8;
3995
3999
  case 8:
4000
+ if (this.disposed || this.counter != counter) {
4001
+ return [2 /*return*/];
4002
+ }
3996
4003
  ele = document.createElement("div");
3997
4004
  ele.innerHTML = text;
3998
4005
  ele.setAttribute("style", "\n position: absolute;\n z-index: 0;\n display: none;\n pointer-events: none;\n padding: 6px 8px;\n border-radius: 6px;\n font-family: Arial;\n font-size: 12px;\n -webkit-backdrop-filter: blur(20px);\n backdrop-filter: blur(20px);\n background: rgba(33,39,42,.8);\n border-radius: 9px;\n box-shadow: 0 0 1px rgba(18,22,25,.36),0 18px 36px -4px rgba(18,22,25,.36);\n color: #ffffff;\n }");
@@ -16068,7 +16075,7 @@
16068
16075
  ViewerUtils.CreateWidgets = CreateWidgets;
16069
16076
  })(exports.ViewerUtils || (exports.ViewerUtils = {}));
16070
16077
 
16071
- var VERSION$1 = "2.8.6";
16078
+ var VERSION$1 = "2.8.7";
16072
16079
 
16073
16080
  exports.VERSION = VERSION$1;
16074
16081
  exports.CesiumViewMonitor = CesiumViewMonitor;