bruce-cesium 2.5.4 → 2.5.6
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.
- package/dist/bruce-cesium.es5.js +41 -27
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +40 -26
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +38 -24
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/tile-render-engine.js +1 -1
- package/dist/lib/rendering/tile-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -1628,9 +1628,9 @@
|
|
|
1628
1628
|
}
|
|
1629
1629
|
return data;
|
|
1630
1630
|
}
|
|
1631
|
-
function getHeightRef(style) {
|
|
1631
|
+
function getHeightRef(style, defaultStyle) {
|
|
1632
1632
|
var _a;
|
|
1633
|
-
var heightRef = Cesium.HeightReference.CLAMP_TO_GROUND;
|
|
1633
|
+
var heightRef = defaultStyle == null ? Cesium.HeightReference.CLAMP_TO_GROUND : defaultStyle;
|
|
1634
1634
|
var altOptionId = (_a = style === null || style === void 0 ? void 0 : style.altitudeOption) === null || _a === void 0 ? void 0 : _a.id;
|
|
1635
1635
|
if (altOptionId == 1) {
|
|
1636
1636
|
heightRef = Cesium.HeightReference.NONE;
|
|
@@ -1691,38 +1691,52 @@
|
|
|
1691
1691
|
}
|
|
1692
1692
|
function getStyle(api, entity, styleId) {
|
|
1693
1693
|
return __awaiter(this, void 0, void 0, function () {
|
|
1694
|
-
var style, typeId, type;
|
|
1694
|
+
var style, e_2, typeId, type, e_3;
|
|
1695
1695
|
return __generator(this, function (_a) {
|
|
1696
1696
|
switch (_a.label) {
|
|
1697
1697
|
case 0:
|
|
1698
1698
|
style = null;
|
|
1699
|
-
if (!styleId) return [3 /*break*/,
|
|
1699
|
+
if (!styleId) return [3 /*break*/, 4];
|
|
1700
|
+
_a.label = 1;
|
|
1701
|
+
case 1:
|
|
1702
|
+
_a.trys.push([1, 3, , 4]);
|
|
1700
1703
|
return [4 /*yield*/, bruceModels.Style.Get({
|
|
1701
1704
|
api: api,
|
|
1702
1705
|
styleId: styleId
|
|
1703
1706
|
})];
|
|
1704
|
-
case 1:
|
|
1705
|
-
style = (_a.sent()).style;
|
|
1706
|
-
_a.label = 2;
|
|
1707
1707
|
case 2:
|
|
1708
|
-
|
|
1708
|
+
style = (_a.sent()).style;
|
|
1709
|
+
return [3 /*break*/, 4];
|
|
1710
|
+
case 3:
|
|
1711
|
+
e_2 = _a.sent();
|
|
1712
|
+
console.error(e_2);
|
|
1713
|
+
return [3 /*break*/, 4];
|
|
1714
|
+
case 4:
|
|
1715
|
+
if (!!style) return [3 /*break*/, 9];
|
|
1709
1716
|
typeId = entity.Bruce["EntityType.ID"];
|
|
1710
|
-
if (!typeId) return [3 /*break*/,
|
|
1717
|
+
if (!typeId) return [3 /*break*/, 9];
|
|
1711
1718
|
return [4 /*yield*/, bruceModels.EntityType.Get({
|
|
1712
1719
|
api: api,
|
|
1713
1720
|
entityTypeId: typeId
|
|
1714
1721
|
})];
|
|
1715
|
-
case
|
|
1722
|
+
case 5:
|
|
1716
1723
|
type = (_a.sent()).entityType;
|
|
1717
|
-
if (!type["DisplaySetting.ID"]) return [3 /*break*/,
|
|
1724
|
+
if (!type["DisplaySetting.ID"]) return [3 /*break*/, 9];
|
|
1725
|
+
_a.label = 6;
|
|
1726
|
+
case 6:
|
|
1727
|
+
_a.trys.push([6, 8, , 9]);
|
|
1718
1728
|
return [4 /*yield*/, bruceModels.Style.Get({
|
|
1719
1729
|
api: api,
|
|
1720
1730
|
styleId: type["DisplaySetting.ID"]
|
|
1721
1731
|
})];
|
|
1722
|
-
case
|
|
1732
|
+
case 7:
|
|
1723
1733
|
style = (_a.sent()).style;
|
|
1724
|
-
|
|
1725
|
-
case
|
|
1734
|
+
return [3 /*break*/, 9];
|
|
1735
|
+
case 8:
|
|
1736
|
+
e_3 = _a.sent();
|
|
1737
|
+
console.error(e_3);
|
|
1738
|
+
return [3 /*break*/, 9];
|
|
1739
|
+
case 9: return [2 /*return*/, style];
|
|
1726
1740
|
}
|
|
1727
1741
|
});
|
|
1728
1742
|
});
|
|
@@ -2097,7 +2111,7 @@
|
|
|
2097
2111
|
(function (Point) {
|
|
2098
2112
|
function Render(params) {
|
|
2099
2113
|
return __awaiter(this, void 0, void 0, function () {
|
|
2100
|
-
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, res,
|
|
2114
|
+
var entity, style, type, cEntity, siblings, iconUrlRows, icon, iconUrl, res, e_4, iconScale, heightRef, radius, bFill, cFill, outline, cOutline, outlineWidth, outlineHeight, bOutline, fillHeight, exHeightRef, pos, bColor, cColor, size, heightRef;
|
|
2101
2115
|
return __generator(this, function (_a) {
|
|
2102
2116
|
switch (_a.label) {
|
|
2103
2117
|
case 0:
|
|
@@ -2150,7 +2164,7 @@
|
|
|
2150
2164
|
_a.label = 4;
|
|
2151
2165
|
case 4: return [3 /*break*/, 6];
|
|
2152
2166
|
case 5:
|
|
2153
|
-
|
|
2167
|
+
e_4 = _a.sent();
|
|
2154
2168
|
iconUrl = null;
|
|
2155
2169
|
return [3 /*break*/, 6];
|
|
2156
2170
|
case 6:
|
|
@@ -2251,10 +2265,10 @@
|
|
|
2251
2265
|
}
|
|
2252
2266
|
if (!cEntity) {
|
|
2253
2267
|
bColor = style.color ? bruceModels.Calculator.GetColor(style.color, entity, params.tags) : null;
|
|
2254
|
-
cColor = bColor ? colorToCColor(bColor) : Cesium.Color.
|
|
2268
|
+
cColor = bColor ? colorToCColor(bColor) : Cesium.Color.fromCssColorString("rgba(33, 150, 243, 0.8)");
|
|
2255
2269
|
size = style.size ? bruceModels.Calculator.GetNumber(style.size, entity, params.tags) : null;
|
|
2256
2270
|
if (size == null) {
|
|
2257
|
-
size =
|
|
2271
|
+
size = 20;
|
|
2258
2272
|
}
|
|
2259
2273
|
size = EnsureNumber(size);
|
|
2260
2274
|
if (size <= 0) {
|
|
@@ -2403,13 +2417,13 @@
|
|
|
2403
2417
|
return null;
|
|
2404
2418
|
}
|
|
2405
2419
|
var bColor = style.lineColor ? bruceModels.Calculator.GetColor(style.lineColor, entity, params.tags) : null;
|
|
2406
|
-
var cColor = bColor ? colorToCColor(bColor) : Cesium.Color.
|
|
2420
|
+
var cColor = bColor ? colorToCColor(bColor) : Cesium.Color.fromCssColorString("rgba(255, 193, 7, 0.8)");
|
|
2407
2421
|
if (cColor.alpha <= 0) {
|
|
2408
2422
|
return null;
|
|
2409
2423
|
}
|
|
2410
2424
|
var width = style.lineWidth ? bruceModels.Calculator.GetNumber(style.lineWidth, entity, params.tags) : null;
|
|
2411
2425
|
if (width == null) {
|
|
2412
|
-
width =
|
|
2426
|
+
width = 2;
|
|
2413
2427
|
}
|
|
2414
2428
|
width = EnsureNumber(width);
|
|
2415
2429
|
if (width < 0.01) {
|
|
@@ -2531,12 +2545,12 @@
|
|
|
2531
2545
|
}
|
|
2532
2546
|
var style = params.style;
|
|
2533
2547
|
var bFillColor = bruceModels.Calculator.GetColor(style.fillColor, entity, params.tags);
|
|
2534
|
-
var cFillColor = bFillColor ? colorToCColor(bFillColor) : Cesium.Color.
|
|
2548
|
+
var cFillColor = bFillColor ? colorToCColor(bFillColor) : Cesium.Color.fromCssColorString("rgba(139, 195, 74, 0.8)");
|
|
2535
2549
|
var bLineColor = bruceModels.Calculator.GetColor(style.lineColor, entity, params.tags);
|
|
2536
|
-
var cLineColor = bLineColor ? colorToCColor(bLineColor) : Cesium.Color.
|
|
2550
|
+
var cLineColor = bLineColor ? colorToCColor(bLineColor) : Cesium.Color.fromCssColorString("rgba(80, 80, 80, 0.8)");
|
|
2537
2551
|
var width = style.lineWidth ? bruceModels.Calculator.GetNumber(style.lineWidth, entity, params.tags) : null;
|
|
2538
2552
|
if (width == null) {
|
|
2539
|
-
width =
|
|
2553
|
+
width = 1;
|
|
2540
2554
|
}
|
|
2541
2555
|
width = EnsureNumber(width);
|
|
2542
2556
|
if (width < 0.01) {
|
|
@@ -2759,7 +2773,7 @@
|
|
|
2759
2773
|
styleScale = 1;
|
|
2760
2774
|
}
|
|
2761
2775
|
var hpr = new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(heading), Cesium.Math.toRadians(pitch), Cesium.Math.toRadians(roll));
|
|
2762
|
-
var heightRef = getHeightRef(style);
|
|
2776
|
+
var heightRef = getHeightRef(style, Cesium.HeightReference.RELATIVE_TO_GROUND);
|
|
2763
2777
|
var pos = exports.EntityUtils.GetPos({
|
|
2764
2778
|
viewer: params.viewer,
|
|
2765
2779
|
entity: entity,
|
|
@@ -9976,7 +9990,7 @@
|
|
|
9976
9990
|
})];
|
|
9977
9991
|
case 2:
|
|
9978
9992
|
pKey = (_a.sent()).programKey;
|
|
9979
|
-
key = pKey.Key;
|
|
9993
|
+
key = pKey === null || pKey === void 0 ? void 0 : pKey.Key;
|
|
9980
9994
|
return [3 /*break*/, 4];
|
|
9981
9995
|
case 3:
|
|
9982
9996
|
e_1 = _a.sent();
|
|
@@ -14948,7 +14962,7 @@
|
|
|
14948
14962
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
14949
14963
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
14950
14964
|
|
|
14951
|
-
var VERSION$1 = "2.5.
|
|
14965
|
+
var VERSION$1 = "2.5.6";
|
|
14952
14966
|
|
|
14953
14967
|
exports.VERSION = VERSION$1;
|
|
14954
14968
|
exports.CesiumViewMonitor = CesiumViewMonitor;
|