bruce-cesium 0.7.0 → 0.7.2

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.
@@ -1097,9 +1097,22 @@
1097
1097
  var entity = params.entity;
1098
1098
  var style = params.style;
1099
1099
  var type = style.Type;
1100
+ if (type == null) {
1101
+ // Very old backward compatibility.
1102
+ if (style.useIcon == true) {
1103
+ type = bruceModels.Style.EPointType.Icon;
1104
+ }
1105
+ }
1100
1106
  var cEntity = null;
1101
1107
  if (type == bruceModels.Style.EPointType.Icon) {
1102
- var icon = bruceModels.Calculator.GetValue(style.iconUrl, entity, params.tags);
1108
+ // Fixing poor data.
1109
+ var iconUrlRows = style.iconUrl == null ? [] : style.iconUrl;
1110
+ iconUrlRows.forEach(function (row) {
1111
+ if (row.type == bruceModels.Calculator.EValueType.Color) {
1112
+ row.type = bruceModels.Calculator.EValueType.Input;
1113
+ }
1114
+ });
1115
+ var icon = bruceModels.Calculator.GetValue(iconUrlRows, entity, params.tags);
1103
1116
  var iconUrl = null;
1104
1117
  if (typeof icon == "string") {
1105
1118
  iconUrl = icon;
@@ -1444,7 +1457,7 @@
1444
1457
  heading = (heading + 90) % 360;
1445
1458
  var pitch = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.pitch);
1446
1459
  var roll = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.roll);
1447
- var scale = EnsureNumber(transform.scale, 1);
1460
+ var scale = EnsureNumber(transform === null || transform === void 0 ? void 0 : transform.scale, 1);
1448
1461
  if (scale <= 0) {
1449
1462
  scale = 1;
1450
1463
  }
@@ -1924,9 +1937,11 @@
1924
1937
  }
1925
1938
  }
1926
1939
  else if (visual instanceof Cesium.Cesium3DTileFeature) {
1927
- // No way to tell if changing show will crash it!
1928
1940
  try {
1929
- visual.show = false;
1941
+ var tileset = visual === null || visual === void 0 ? void 0 : visual.tileset;
1942
+ if (tileset && viewer.scene.primitives.contains(tileset)) {
1943
+ visual.show = false;
1944
+ }
1930
1945
  }
1931
1946
  catch (e) {
1932
1947
  console.error(e);
@@ -5670,7 +5685,6 @@
5670
5685
  })(exports.ViewUtils || (exports.ViewUtils = {}));
5671
5686
 
5672
5687
  exports.CesiumViewMonitor = CesiumViewMonitor;
5673
- exports.EnsureNumber = EnsureNumber;
5674
5688
 
5675
5689
  Object.defineProperty(exports, '__esModule', { value: true });
5676
5690