bruce-cesium 2.5.2 → 2.5.4
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 +304 -162
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +303 -161
- 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 +142 -119
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +1 -1
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +17 -0
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js +17 -0
- package/dist/lib/rendering/render-managers/entities/entities-loaded-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +63 -34
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js +17 -0
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js +17 -6
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/lib/viewer/viewer-utils.js +29 -0
- package/dist/lib/viewer/viewer-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/entities/entities-ids-render-manager.d.ts +5 -1
- package/dist/types/rendering/render-managers/entities/entities-loaded-render-manager.d.ts +5 -1
- package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +7 -1
- package/dist/types/rendering/render-managers/entities/entity-render-manager.d.ts +5 -1
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -1975,7 +1975,6 @@
|
|
|
1975
1975
|
rendered = rendered.filter(function (x) { return x != null; });
|
|
1976
1976
|
if (rendered.length) {
|
|
1977
1977
|
rootEntity_1 = new Cesium.Entity({});
|
|
1978
|
-
params.viewer.entities.add(rootEntity_1);
|
|
1979
1978
|
rootEntity_1._siblingGraphics = [];
|
|
1980
1979
|
rootEntity_1._renderGroup = getRenderGroupId(zoomItem, (_h = params.viewer) === null || _h === void 0 ? void 0 : _h.terrainProvider);
|
|
1981
1980
|
rootEntity_1._siblingGraphics = rootEntity_1._siblingGraphics.concat(rendered);
|
|
@@ -2179,7 +2178,7 @@
|
|
|
2179
2178
|
recordHeightRef: heightRef,
|
|
2180
2179
|
returnHeightRef: heightRef
|
|
2181
2180
|
}),
|
|
2182
|
-
show:
|
|
2181
|
+
show: true
|
|
2183
2182
|
});
|
|
2184
2183
|
}
|
|
2185
2184
|
}
|
|
@@ -2226,7 +2225,7 @@
|
|
|
2226
2225
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance)
|
|
2227
2226
|
},
|
|
2228
2227
|
position: pos === null || pos === void 0 ? void 0 : pos.clone(),
|
|
2229
|
-
show:
|
|
2228
|
+
show: true
|
|
2230
2229
|
});
|
|
2231
2230
|
if (outline && outlineWidth > 0) {
|
|
2232
2231
|
if (!exHeightRef && outlineHeight > 0) {
|
|
@@ -2275,16 +2274,10 @@
|
|
|
2275
2274
|
recordHeightRef: heightRef,
|
|
2276
2275
|
returnHeightRef: heightRef
|
|
2277
2276
|
}),
|
|
2278
|
-
show:
|
|
2277
|
+
show: true
|
|
2279
2278
|
});
|
|
2280
2279
|
}
|
|
2281
2280
|
if (cEntity) {
|
|
2282
|
-
params.viewer.entities.add(cEntity);
|
|
2283
|
-
if (siblings) {
|
|
2284
|
-
siblings.forEach(function (sibling) {
|
|
2285
|
-
params.viewer.entities.add(sibling);
|
|
2286
|
-
});
|
|
2287
|
-
}
|
|
2288
2281
|
cEntity._siblingGraphics = siblings;
|
|
2289
2282
|
}
|
|
2290
2283
|
return [2 /*return*/, cEntity];
|
|
@@ -2296,33 +2289,40 @@
|
|
|
2296
2289
|
function RenderGroup(params) {
|
|
2297
2290
|
var _a, _b, _c;
|
|
2298
2291
|
return __awaiter(this, void 0, void 0, function () {
|
|
2299
|
-
var api, cEntities, i, entity, zoomItem, style, tagIds, tags, pStyle, cEntity, name_2;
|
|
2300
|
-
return __generator(this, function (
|
|
2301
|
-
switch (
|
|
2292
|
+
var api, cEntities, i, entity, zoomItem, style, _d, tagIds, tags, pStyle, cEntity, name_2;
|
|
2293
|
+
return __generator(this, function (_e) {
|
|
2294
|
+
switch (_e.label) {
|
|
2302
2295
|
case 0:
|
|
2303
2296
|
api = params.apiGetter.getApi();
|
|
2304
2297
|
cEntities = {};
|
|
2305
2298
|
i = 0;
|
|
2306
|
-
|
|
2299
|
+
_e.label = 1;
|
|
2307
2300
|
case 1:
|
|
2308
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
2301
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 11];
|
|
2309
2302
|
entity = params.entities[i];
|
|
2310
2303
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
2304
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
2311
2305
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
2312
2306
|
case 2:
|
|
2313
|
-
|
|
2307
|
+
_d = (_a = (_e.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
2308
|
+
return [3 /*break*/, 4];
|
|
2309
|
+
case 3:
|
|
2310
|
+
_d = zoomItem.Style;
|
|
2311
|
+
_e.label = 4;
|
|
2312
|
+
case 4:
|
|
2313
|
+
style = _d;
|
|
2314
2314
|
tagIds = entity.Bruce["Layer.ID"];
|
|
2315
2315
|
tags = [];
|
|
2316
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
2316
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
2317
2317
|
return [4 /*yield*/, bruceModels.EntityTag.GetListByIds({
|
|
2318
2318
|
api: api,
|
|
2319
2319
|
tagIds: tagIds
|
|
2320
2320
|
})];
|
|
2321
|
-
case
|
|
2322
|
-
tags = (
|
|
2323
|
-
|
|
2324
|
-
case
|
|
2325
|
-
pStyle = (_b =
|
|
2321
|
+
case 5:
|
|
2322
|
+
tags = (_e.sent()).tags;
|
|
2323
|
+
_e.label = 6;
|
|
2324
|
+
case 6:
|
|
2325
|
+
pStyle = (_b = style === null || style === void 0 ? void 0 : style.pointStyle) !== null && _b !== void 0 ? _b : {};
|
|
2326
2326
|
return [4 /*yield*/, Render({
|
|
2327
2327
|
entity: entity,
|
|
2328
2328
|
style: pStyle,
|
|
@@ -2332,22 +2332,22 @@
|
|
|
2332
2332
|
maxDistance: zoomItem.MaxZoom,
|
|
2333
2333
|
minDistance: zoomItem.MinZoom
|
|
2334
2334
|
})];
|
|
2335
|
-
case
|
|
2336
|
-
cEntity =
|
|
2337
|
-
if (!cEntity) return [3 /*break*/,
|
|
2335
|
+
case 7:
|
|
2336
|
+
cEntity = _e.sent();
|
|
2337
|
+
if (!cEntity) return [3 /*break*/, 9];
|
|
2338
2338
|
return [4 /*yield*/, getName(api, entity)];
|
|
2339
|
-
case
|
|
2340
|
-
name_2 =
|
|
2339
|
+
case 8:
|
|
2340
|
+
name_2 = _e.sent();
|
|
2341
2341
|
cEntity.name = name_2;
|
|
2342
2342
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_c = params.viewer) === null || _c === void 0 ? void 0 : _c.terrainProvider);
|
|
2343
|
-
|
|
2344
|
-
case
|
|
2343
|
+
_e.label = 9;
|
|
2344
|
+
case 9:
|
|
2345
2345
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
2346
|
-
|
|
2347
|
-
case
|
|
2346
|
+
_e.label = 10;
|
|
2347
|
+
case 10:
|
|
2348
2348
|
i++;
|
|
2349
2349
|
return [3 /*break*/, 1];
|
|
2350
|
-
case
|
|
2350
|
+
case 11: return [2 /*return*/, cEntities];
|
|
2351
2351
|
}
|
|
2352
2352
|
});
|
|
2353
2353
|
});
|
|
@@ -2452,42 +2452,48 @@
|
|
|
2452
2452
|
recordHeightRef: heightRef,
|
|
2453
2453
|
returnHeightRef: heightRef
|
|
2454
2454
|
}),
|
|
2455
|
-
show:
|
|
2455
|
+
show: true
|
|
2456
2456
|
});
|
|
2457
|
-
params.viewer.entities.add(cEntity);
|
|
2458
2457
|
return cEntity;
|
|
2459
2458
|
}
|
|
2460
2459
|
Polyline.Render = Render;
|
|
2461
2460
|
function RenderGroup(params) {
|
|
2462
2461
|
var _a, _b, _c;
|
|
2463
2462
|
return __awaiter(this, void 0, void 0, function () {
|
|
2464
|
-
var api, cEntities, i, entity, zoomItem, style, tagIds, tags, lStyle, cEntity, name_3;
|
|
2465
|
-
return __generator(this, function (
|
|
2466
|
-
switch (
|
|
2463
|
+
var api, cEntities, i, entity, zoomItem, style, _d, tagIds, tags, lStyle, cEntity, name_3;
|
|
2464
|
+
return __generator(this, function (_e) {
|
|
2465
|
+
switch (_e.label) {
|
|
2467
2466
|
case 0:
|
|
2468
2467
|
api = params.apiGetter.getApi();
|
|
2469
2468
|
cEntities = {};
|
|
2470
2469
|
i = 0;
|
|
2471
|
-
|
|
2470
|
+
_e.label = 1;
|
|
2472
2471
|
case 1:
|
|
2473
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
2472
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
2474
2473
|
entity = params.entities[i];
|
|
2475
2474
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
2475
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
2476
2476
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
2477
2477
|
case 2:
|
|
2478
|
-
|
|
2478
|
+
_d = (_a = (_e.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
2479
|
+
return [3 /*break*/, 4];
|
|
2480
|
+
case 3:
|
|
2481
|
+
_d = zoomItem.Style;
|
|
2482
|
+
_e.label = 4;
|
|
2483
|
+
case 4:
|
|
2484
|
+
style = _d;
|
|
2479
2485
|
tagIds = entity.Bruce["Layer.ID"];
|
|
2480
2486
|
tags = [];
|
|
2481
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
2487
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
2482
2488
|
return [4 /*yield*/, bruceModels.EntityTag.GetListByIds({
|
|
2483
2489
|
api: api,
|
|
2484
2490
|
tagIds: tagIds
|
|
2485
2491
|
})];
|
|
2486
|
-
case
|
|
2487
|
-
tags = (
|
|
2488
|
-
|
|
2489
|
-
case
|
|
2490
|
-
lStyle = (_b =
|
|
2492
|
+
case 5:
|
|
2493
|
+
tags = (_e.sent()).tags;
|
|
2494
|
+
_e.label = 6;
|
|
2495
|
+
case 6:
|
|
2496
|
+
lStyle = (_b = style === null || style === void 0 ? void 0 : style.polylineStyle) !== null && _b !== void 0 ? _b : {};
|
|
2491
2497
|
cEntity = Render({
|
|
2492
2498
|
entity: entity,
|
|
2493
2499
|
style: lStyle,
|
|
@@ -2496,18 +2502,18 @@
|
|
|
2496
2502
|
maxDistance: zoomItem.MaxZoom,
|
|
2497
2503
|
minDistance: zoomItem.MinZoom
|
|
2498
2504
|
});
|
|
2499
|
-
if (!cEntity) return [3 /*break*/,
|
|
2505
|
+
if (!cEntity) return [3 /*break*/, 8];
|
|
2500
2506
|
return [4 /*yield*/, getName(api, entity)];
|
|
2501
|
-
case
|
|
2502
|
-
name_3 =
|
|
2507
|
+
case 7:
|
|
2508
|
+
name_3 = _e.sent();
|
|
2503
2509
|
cEntity.name = name_3;
|
|
2504
2510
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_c = params.viewer) === null || _c === void 0 ? void 0 : _c.terrainProvider);
|
|
2505
2511
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
2506
|
-
|
|
2507
|
-
case
|
|
2512
|
+
_e.label = 8;
|
|
2513
|
+
case 8:
|
|
2508
2514
|
i++;
|
|
2509
2515
|
return [3 /*break*/, 1];
|
|
2510
|
-
case
|
|
2516
|
+
case 9: return [2 /*return*/, cEntities];
|
|
2511
2517
|
}
|
|
2512
2518
|
});
|
|
2513
2519
|
});
|
|
@@ -2579,7 +2585,7 @@
|
|
|
2579
2585
|
recordHeightRef: heightRef,
|
|
2580
2586
|
returnHeightRef: heightRef
|
|
2581
2587
|
}),
|
|
2582
|
-
show:
|
|
2588
|
+
show: true
|
|
2583
2589
|
});
|
|
2584
2590
|
cEntity._siblingGraphics = [];
|
|
2585
2591
|
if (width > 0 && cLineColor) {
|
|
@@ -2630,9 +2636,8 @@
|
|
|
2630
2636
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2631
2637
|
shadows: Cesium.ShadowMode.ENABLED
|
|
2632
2638
|
},
|
|
2633
|
-
show:
|
|
2639
|
+
show: true
|
|
2634
2640
|
});
|
|
2635
|
-
params.viewer.entities.add(cEntityBorder);
|
|
2636
2641
|
cEntityBorder._parentEntity = cEntity;
|
|
2637
2642
|
cEntity._siblingGraphics.push(cEntityBorder);
|
|
2638
2643
|
for (var i = 0; i < holePosses.length; i++) {
|
|
@@ -2662,47 +2667,52 @@
|
|
|
2662
2667
|
distanceDisplayCondition: getDisplayCondition(params.minDistance, params.maxDistance, width),
|
|
2663
2668
|
shadows: Cesium.ShadowMode.ENABLED,
|
|
2664
2669
|
},
|
|
2665
|
-
show:
|
|
2670
|
+
show: true
|
|
2666
2671
|
});
|
|
2667
2672
|
cEntity._siblingGraphics.push(cEntityHole);
|
|
2668
2673
|
cEntityHole._parentEntity = cEntity;
|
|
2669
|
-
params.viewer.entities.add(cEntityHole);
|
|
2670
2674
|
}
|
|
2671
2675
|
}
|
|
2672
|
-
params.viewer.entities.add(cEntity);
|
|
2673
2676
|
return cEntity;
|
|
2674
2677
|
}
|
|
2675
2678
|
Polygon.Render = Render;
|
|
2676
2679
|
function RenderGroup(params) {
|
|
2677
2680
|
var _a, _b, _c;
|
|
2678
2681
|
return __awaiter(this, void 0, void 0, function () {
|
|
2679
|
-
var api, cEntities, i, entity, zoomItem, style, tagIds, tags, pStyle, cEntity, name_4;
|
|
2680
|
-
return __generator(this, function (
|
|
2681
|
-
switch (
|
|
2682
|
+
var api, cEntities, i, entity, zoomItem, style, _d, tagIds, tags, pStyle, cEntity, name_4;
|
|
2683
|
+
return __generator(this, function (_e) {
|
|
2684
|
+
switch (_e.label) {
|
|
2682
2685
|
case 0:
|
|
2683
2686
|
api = params.apiGetter.getApi();
|
|
2684
2687
|
cEntities = {};
|
|
2685
2688
|
i = 0;
|
|
2686
|
-
|
|
2689
|
+
_e.label = 1;
|
|
2687
2690
|
case 1:
|
|
2688
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
2691
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 9];
|
|
2689
2692
|
entity = params.entities[i];
|
|
2690
2693
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
2694
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
2691
2695
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
2692
2696
|
case 2:
|
|
2693
|
-
|
|
2697
|
+
_d = (_a = (_e.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
2698
|
+
return [3 /*break*/, 4];
|
|
2699
|
+
case 3:
|
|
2700
|
+
_d = zoomItem.Style;
|
|
2701
|
+
_e.label = 4;
|
|
2702
|
+
case 4:
|
|
2703
|
+
style = _d;
|
|
2694
2704
|
tagIds = entity.Bruce["Layer.ID"];
|
|
2695
2705
|
tags = [];
|
|
2696
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
2706
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
2697
2707
|
return [4 /*yield*/, bruceModels.EntityTag.GetListByIds({
|
|
2698
2708
|
api: api,
|
|
2699
2709
|
tagIds: tagIds
|
|
2700
2710
|
})];
|
|
2701
|
-
case
|
|
2702
|
-
tags = (
|
|
2703
|
-
|
|
2704
|
-
case
|
|
2705
|
-
pStyle = (_b =
|
|
2711
|
+
case 5:
|
|
2712
|
+
tags = (_e.sent()).tags;
|
|
2713
|
+
_e.label = 6;
|
|
2714
|
+
case 6:
|
|
2715
|
+
pStyle = (_b = style === null || style === void 0 ? void 0 : style.polygonStyle) !== null && _b !== void 0 ? _b : {};
|
|
2706
2716
|
cEntity = Render({
|
|
2707
2717
|
entity: entity,
|
|
2708
2718
|
style: pStyle,
|
|
@@ -2711,18 +2721,18 @@
|
|
|
2711
2721
|
maxDistance: zoomItem.MaxZoom,
|
|
2712
2722
|
minDistance: zoomItem.MinZoom
|
|
2713
2723
|
});
|
|
2714
|
-
if (!cEntity) return [3 /*break*/,
|
|
2724
|
+
if (!cEntity) return [3 /*break*/, 8];
|
|
2715
2725
|
return [4 /*yield*/, getName(api, entity)];
|
|
2716
|
-
case
|
|
2717
|
-
name_4 =
|
|
2726
|
+
case 7:
|
|
2727
|
+
name_4 = _e.sent();
|
|
2718
2728
|
cEntity.name = name_4;
|
|
2719
2729
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_c = params.viewer) === null || _c === void 0 ? void 0 : _c.terrainProvider);
|
|
2720
2730
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
2721
|
-
|
|
2722
|
-
case
|
|
2731
|
+
_e.label = 8;
|
|
2732
|
+
case 8:
|
|
2723
2733
|
i++;
|
|
2724
2734
|
return [3 /*break*/, 1];
|
|
2725
|
-
case
|
|
2735
|
+
case 9: return [2 /*return*/, cEntities];
|
|
2726
2736
|
}
|
|
2727
2737
|
});
|
|
2728
2738
|
});
|
|
@@ -2794,7 +2804,7 @@
|
|
|
2794
2804
|
},
|
|
2795
2805
|
orientation: orientation,
|
|
2796
2806
|
position: pos,
|
|
2797
|
-
show:
|
|
2807
|
+
show: true
|
|
2798
2808
|
});
|
|
2799
2809
|
var model = cEntity.model;
|
|
2800
2810
|
model._clientFileId = params.lodClientFileId;
|
|
@@ -2802,16 +2812,15 @@
|
|
|
2802
2812
|
record: scale,
|
|
2803
2813
|
style: styleScale
|
|
2804
2814
|
};
|
|
2805
|
-
params.viewer.entities.add(cEntity);
|
|
2806
2815
|
return cEntity;
|
|
2807
2816
|
}
|
|
2808
2817
|
Model3d.Render = Render;
|
|
2809
2818
|
function RenderGroup(params) {
|
|
2810
2819
|
var _a, _b, _c, _d, _e;
|
|
2811
2820
|
return __awaiter(this, void 0, void 0, function () {
|
|
2812
|
-
var api, cEntities, reqBody, i, entity, zoomItem, style, tagIds, tags, mStyle, group, level, catId, lodData, _loop_2, i;
|
|
2813
|
-
return __generator(this, function (
|
|
2814
|
-
switch (
|
|
2821
|
+
var api, cEntities, reqBody, i, entity, zoomItem, style, _f, tagIds, tags, mStyle, group, level, catId, lodData, _loop_2, i;
|
|
2822
|
+
return __generator(this, function (_g) {
|
|
2823
|
+
switch (_g.label) {
|
|
2815
2824
|
case 0:
|
|
2816
2825
|
api = params.apiGetter.getApi();
|
|
2817
2826
|
cEntities = {};
|
|
@@ -2821,26 +2830,33 @@
|
|
|
2821
2830
|
"Items": []
|
|
2822
2831
|
};
|
|
2823
2832
|
i = 0;
|
|
2824
|
-
|
|
2833
|
+
_g.label = 1;
|
|
2825
2834
|
case 1:
|
|
2826
|
-
if (!(i < params.entities.length)) return [3 /*break*/,
|
|
2835
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 8];
|
|
2827
2836
|
entity = params.entities[i];
|
|
2828
2837
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
2838
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 3];
|
|
2829
2839
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
2830
2840
|
case 2:
|
|
2831
|
-
|
|
2841
|
+
_f = (_a = (_g.sent())) === null || _a === void 0 ? void 0 : _a.Settings;
|
|
2842
|
+
return [3 /*break*/, 4];
|
|
2843
|
+
case 3:
|
|
2844
|
+
_f = zoomItem.Style;
|
|
2845
|
+
_g.label = 4;
|
|
2846
|
+
case 4:
|
|
2847
|
+
style = _f;
|
|
2832
2848
|
tagIds = entity.Bruce["Layer.ID"];
|
|
2833
2849
|
tags = [];
|
|
2834
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
2850
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 6];
|
|
2835
2851
|
return [4 /*yield*/, bruceModels.EntityTag.GetListByIds({
|
|
2836
2852
|
api: api,
|
|
2837
2853
|
tagIds: tagIds
|
|
2838
2854
|
})];
|
|
2839
|
-
case
|
|
2840
|
-
tags = (
|
|
2841
|
-
|
|
2842
|
-
case
|
|
2843
|
-
mStyle = (_b =
|
|
2855
|
+
case 5:
|
|
2856
|
+
tags = (_g.sent()).tags;
|
|
2857
|
+
_g.label = 6;
|
|
2858
|
+
case 6:
|
|
2859
|
+
mStyle = (_b = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _b !== void 0 ? _b : {};
|
|
2844
2860
|
group = mStyle.lodGroup ? bruceModels.Calculator.GetString(mStyle.lodGroup, entity, tags) : null;
|
|
2845
2861
|
if (!group) {
|
|
2846
2862
|
group = "DEFAULT";
|
|
@@ -2859,42 +2875,49 @@
|
|
|
2859
2875
|
"group": group,
|
|
2860
2876
|
"level": level
|
|
2861
2877
|
});
|
|
2862
|
-
|
|
2863
|
-
case
|
|
2878
|
+
_g.label = 7;
|
|
2879
|
+
case 7:
|
|
2864
2880
|
i++;
|
|
2865
2881
|
return [3 /*break*/, 1];
|
|
2866
|
-
case
|
|
2882
|
+
case 8: return [4 /*yield*/, bruceModels.EntityLod.GetLods({
|
|
2867
2883
|
api: api,
|
|
2868
2884
|
filter: reqBody
|
|
2869
2885
|
})];
|
|
2870
|
-
case
|
|
2871
|
-
lodData = (
|
|
2886
|
+
case 9:
|
|
2887
|
+
lodData = (_g.sent()).lods;
|
|
2872
2888
|
_loop_2 = function (i) {
|
|
2873
|
-
var entity, zoomItem, style, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
2874
|
-
return __generator(this, function (
|
|
2875
|
-
switch (
|
|
2889
|
+
var entity, zoomItem, style, _h, tagIds, tags, lod, mStyle, cEntity, name_5;
|
|
2890
|
+
return __generator(this, function (_j) {
|
|
2891
|
+
switch (_j.label) {
|
|
2876
2892
|
case 0:
|
|
2877
2893
|
entity = params.entities[i];
|
|
2878
2894
|
zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
2895
|
+
if (!(zoomItem.StyleID != -1)) return [3 /*break*/, 2];
|
|
2879
2896
|
return [4 /*yield*/, getStyle(api, entity, zoomItem.StyleID)];
|
|
2880
2897
|
case 1:
|
|
2881
|
-
|
|
2898
|
+
_h = (_c = (_j.sent())) === null || _c === void 0 ? void 0 : _c.Settings;
|
|
2899
|
+
return [3 /*break*/, 3];
|
|
2900
|
+
case 2:
|
|
2901
|
+
_h = zoomItem.Style;
|
|
2902
|
+
_j.label = 3;
|
|
2903
|
+
case 3:
|
|
2904
|
+
style = _h;
|
|
2882
2905
|
tagIds = entity.Bruce["Layer.ID"];
|
|
2883
2906
|
tags = [];
|
|
2884
|
-
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/,
|
|
2907
|
+
if (!(tagIds && tagIds.length > 0)) return [3 /*break*/, 5];
|
|
2885
2908
|
return [4 /*yield*/, bruceModels.EntityTag.GetListByIds({
|
|
2886
2909
|
api: api,
|
|
2887
2910
|
tagIds: tagIds
|
|
2888
2911
|
})];
|
|
2889
|
-
case
|
|
2890
|
-
tags = (
|
|
2891
|
-
|
|
2892
|
-
case
|
|
2912
|
+
case 4:
|
|
2913
|
+
tags = (_j.sent()).tags;
|
|
2914
|
+
_j.label = 5;
|
|
2915
|
+
case 5:
|
|
2893
2916
|
lod = lodData.find(function (x) { return x.entityId == entity.Bruce.ID; });
|
|
2894
2917
|
if (!(lod === null || lod === void 0 ? void 0 : lod.clientFileId)) {
|
|
2895
2918
|
return [2 /*return*/, "continue"];
|
|
2896
2919
|
}
|
|
2897
|
-
mStyle = (_d =
|
|
2920
|
+
mStyle = (_d = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _d !== void 0 ? _d : {};
|
|
2898
2921
|
cEntity = Render({
|
|
2899
2922
|
entity: entity,
|
|
2900
2923
|
style: mStyle,
|
|
@@ -2908,30 +2931,30 @@
|
|
|
2908
2931
|
maxDistance: zoomItem.MaxZoom,
|
|
2909
2932
|
minDistance: zoomItem.MinZoom
|
|
2910
2933
|
});
|
|
2911
|
-
if (!cEntity) return [3 /*break*/,
|
|
2934
|
+
if (!cEntity) return [3 /*break*/, 7];
|
|
2912
2935
|
return [4 /*yield*/, getName(api, entity)];
|
|
2913
|
-
case
|
|
2914
|
-
name_5 =
|
|
2936
|
+
case 6:
|
|
2937
|
+
name_5 = _j.sent();
|
|
2915
2938
|
cEntity.name = name_5;
|
|
2916
2939
|
cEntity._renderGroup = getRenderGroupId(zoomItem, (_e = params.viewer) === null || _e === void 0 ? void 0 : _e.terrainProvider);
|
|
2917
2940
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
2918
|
-
|
|
2919
|
-
case
|
|
2941
|
+
_j.label = 7;
|
|
2942
|
+
case 7: return [2 /*return*/];
|
|
2920
2943
|
}
|
|
2921
2944
|
});
|
|
2922
2945
|
};
|
|
2923
2946
|
i = 0;
|
|
2924
|
-
|
|
2925
|
-
case 8:
|
|
2926
|
-
if (!(i < params.entities.length)) return [3 /*break*/, 11];
|
|
2927
|
-
return [5 /*yield**/, _loop_2(i)];
|
|
2928
|
-
case 9:
|
|
2929
|
-
_f.sent();
|
|
2930
|
-
_f.label = 10;
|
|
2947
|
+
_g.label = 10;
|
|
2931
2948
|
case 10:
|
|
2949
|
+
if (!(i < params.entities.length)) return [3 /*break*/, 13];
|
|
2950
|
+
return [5 /*yield**/, _loop_2(i)];
|
|
2951
|
+
case 11:
|
|
2952
|
+
_g.sent();
|
|
2953
|
+
_g.label = 12;
|
|
2954
|
+
case 12:
|
|
2932
2955
|
i++;
|
|
2933
|
-
return [3 /*break*/,
|
|
2934
|
-
case
|
|
2956
|
+
return [3 /*break*/, 10];
|
|
2957
|
+
case 13: return [2 /*return*/, cEntities];
|
|
2935
2958
|
}
|
|
2936
2959
|
});
|
|
2937
2960
|
});
|
|
@@ -3540,18 +3563,29 @@
|
|
|
3540
3563
|
updateCEntityShow(viewer, sibling, show, true);
|
|
3541
3564
|
}
|
|
3542
3565
|
}
|
|
3543
|
-
|
|
3544
|
-
|
|
3566
|
+
/**
|
|
3567
|
+
* Do NOT use ".show" as it causes crashes in Cesium polylines that are clamped to ground.
|
|
3568
|
+
* We could target them specifically here but we may be getting overall performance gain by just removing stuff from the scene.
|
|
3569
|
+
*/
|
|
3570
|
+
if (!show && viewer.entities.contains(visual)) {
|
|
3571
|
+
viewer.entities.remove(visual);
|
|
3572
|
+
}
|
|
3573
|
+
else if (show && !viewer.entities.contains(visual)) {
|
|
3574
|
+
viewer.entities.add(visual);
|
|
3545
3575
|
}
|
|
3546
3576
|
}
|
|
3547
3577
|
function updateEntityShow(viewer, visual, show) {
|
|
3548
|
-
if (!isAlive$1(viewer, visual)) {
|
|
3549
|
-
return;
|
|
3550
|
-
}
|
|
3551
3578
|
if (visual instanceof Cesium.Entity) {
|
|
3579
|
+
if (!(viewer === null || viewer === void 0 ? void 0 : viewer.scene) || viewer.isDestroyed()) {
|
|
3580
|
+
return;
|
|
3581
|
+
}
|
|
3552
3582
|
updateCEntityShow(viewer, visual, show, false);
|
|
3583
|
+
return;
|
|
3553
3584
|
}
|
|
3554
|
-
|
|
3585
|
+
if (!isAlive$1(viewer, visual)) {
|
|
3586
|
+
return;
|
|
3587
|
+
}
|
|
3588
|
+
if (visual instanceof Cesium.Primitive) {
|
|
3555
3589
|
if (viewer.scene.primitives.contains(visual)) {
|
|
3556
3590
|
visual.show = show;
|
|
3557
3591
|
}
|
|
@@ -5248,7 +5282,7 @@
|
|
|
5248
5282
|
});
|
|
5249
5283
|
Manager.prototype.Init = function (params) {
|
|
5250
5284
|
var _this = this;
|
|
5251
|
-
var _a, _b, _c, _d, _e, _f
|
|
5285
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5252
5286
|
if (this.disposed) {
|
|
5253
5287
|
throw (new Error("This item is disposed."));
|
|
5254
5288
|
}
|
|
@@ -5274,13 +5308,10 @@
|
|
|
5274
5308
|
}
|
|
5275
5309
|
tagsToRender = [].concat(tagsToRender);
|
|
5276
5310
|
var shouldRender = !isTagItem || tagsToRender.length > 0;
|
|
5277
|
-
|
|
5278
|
-
this.
|
|
5279
|
-
(_c = this.getterSub) === null || _c === void 0 ? void 0 : _c.call(this);
|
|
5280
|
-
this.getterSub = null;
|
|
5281
|
-
(_d = this.viewMonitorRemoval) === null || _d === void 0 ? void 0 : _d.call(this);
|
|
5311
|
+
this.unsetGetter();
|
|
5312
|
+
(_b = this.viewMonitorRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
5282
5313
|
this.viewMonitorRemoval = null;
|
|
5283
|
-
(
|
|
5314
|
+
(_c = this.entityCheckQueue) === null || _c === void 0 ? void 0 : _c.Dispose();
|
|
5284
5315
|
this.entityCheckQueue = null;
|
|
5285
5316
|
clearInterval(this.renderQueueInterval);
|
|
5286
5317
|
this.renderQueueInterval = null;
|
|
@@ -5292,22 +5323,39 @@
|
|
|
5292
5323
|
menuItemId: this.item.id,
|
|
5293
5324
|
retainTagIds: tagsToRender
|
|
5294
5325
|
});
|
|
5295
|
-
(
|
|
5326
|
+
(_d = this.clustering) === null || _d === void 0 ? void 0 : _d.Dispose();
|
|
5296
5327
|
}
|
|
5297
5328
|
else {
|
|
5298
5329
|
this.visualsManager.RemoveRegos({
|
|
5299
5330
|
menuItemId: this.item.id
|
|
5300
5331
|
});
|
|
5301
|
-
(
|
|
5332
|
+
(_e = this.clustering) === null || _e === void 0 ? void 0 : _e.Dispose();
|
|
5302
5333
|
return;
|
|
5303
5334
|
}
|
|
5304
5335
|
if (this.item.enableClustering) {
|
|
5305
|
-
this.clustering = new PointClustering(this.visualsManager, this.item.id, (
|
|
5336
|
+
this.clustering = new PointClustering(this.visualsManager, this.item.id, (_f = this.item) === null || _f === void 0 ? void 0 : _f.clustering);
|
|
5306
5337
|
}
|
|
5307
|
-
|
|
5338
|
+
this.setGetter();
|
|
5339
|
+
this.viewMonitorRemoval = this.monitor.Updated().Subscribe(function () {
|
|
5340
|
+
_this.entityCheckQueue.Call();
|
|
5341
|
+
});
|
|
5342
|
+
this.entityCheckQueue = new bruceModels.DelayQueue(function () {
|
|
5343
|
+
var _a;
|
|
5344
|
+
// Don't bother checking for zoom control changes if we only have 1 item.
|
|
5345
|
+
// We'll let Cesium handle hide/show at max zoom range.
|
|
5346
|
+
var shouldCheck = ((_a = _this.item) === null || _a === void 0 ? void 0 : _a.CameraZoomSettings) && _this.item.CameraZoomSettings.length > 1;
|
|
5347
|
+
if (shouldCheck) {
|
|
5348
|
+
_this.doEntityCheck(Object.keys(_this.renderedEntities));
|
|
5349
|
+
}
|
|
5350
|
+
}, 3000);
|
|
5351
|
+
};
|
|
5352
|
+
Manager.prototype.setGetter = function () {
|
|
5353
|
+
var _this = this;
|
|
5354
|
+
var _a;
|
|
5355
|
+
this.unsetGetter();
|
|
5308
5356
|
this.getter = this.sharedGetters.GetOrCreateFilterGetter({
|
|
5309
|
-
api:
|
|
5310
|
-
attrFilter: (
|
|
5357
|
+
api: this.apiGetter.getApi(),
|
|
5358
|
+
attrFilter: (_a = this.item.BruceEntity.Filter) !== null && _a !== void 0 ? _a : {},
|
|
5311
5359
|
batchSize: BATCH_SIZE,
|
|
5312
5360
|
typeId: this.item.BruceEntity["EntityType.ID"],
|
|
5313
5361
|
monitor: this.monitor,
|
|
@@ -5319,6 +5367,12 @@
|
|
|
5319
5367
|
zoomControl: this.item.CameraZoomSettings
|
|
5320
5368
|
});
|
|
5321
5369
|
this.getter.IncludeMenuItem(this.item.id, [], minMax[0], minMax[1]);
|
|
5370
|
+
var isTagItem = Boolean(this.item.BruceEntity.ExpandLayers);
|
|
5371
|
+
var tagsToRender = isTagItem ? this.item.BruceEntity.SelectedExpandLayers : null;
|
|
5372
|
+
if (!tagsToRender) {
|
|
5373
|
+
tagsToRender = [];
|
|
5374
|
+
}
|
|
5375
|
+
tagsToRender = [].concat(tagsToRender);
|
|
5322
5376
|
this.getterSub = this.getter.OnUpdate.Subscribe(function (entities) {
|
|
5323
5377
|
if (isTagItem) {
|
|
5324
5378
|
_this.distributeForRender(entities.filter(function (entity) {
|
|
@@ -5335,18 +5389,13 @@
|
|
|
5335
5389
|
_this.distributeForRender(entities);
|
|
5336
5390
|
}
|
|
5337
5391
|
});
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
this.
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
var shouldCheck = ((_a = _this.item) === null || _a === void 0 ? void 0 : _a.CameraZoomSettings) && _this.item.CameraZoomSettings.length > 1;
|
|
5346
|
-
if (shouldCheck) {
|
|
5347
|
-
_this.doEntityCheck(Object.keys(_this.renderedEntities));
|
|
5348
|
-
}
|
|
5349
|
-
}, 3000);
|
|
5392
|
+
};
|
|
5393
|
+
Manager.prototype.unsetGetter = function () {
|
|
5394
|
+
var _a, _b;
|
|
5395
|
+
(_a = this.getter) === null || _a === void 0 ? void 0 : _a.ExcludeMenuItem(this.item.id);
|
|
5396
|
+
this.getter = null;
|
|
5397
|
+
(_b = this.getterSub) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
5398
|
+
this.getterSub = null;
|
|
5350
5399
|
};
|
|
5351
5400
|
Manager.prototype.Dispose = function () {
|
|
5352
5401
|
if (this.disposed) {
|
|
@@ -5355,21 +5404,17 @@
|
|
|
5355
5404
|
this.doDispose();
|
|
5356
5405
|
};
|
|
5357
5406
|
Manager.prototype.doDispose = function () {
|
|
5358
|
-
var _a, _b, _c
|
|
5359
|
-
|
|
5360
|
-
this.getterSub = null;
|
|
5361
|
-
if (this.getter) {
|
|
5362
|
-
this.getter.ExcludeMenuItem(this.item.id);
|
|
5363
|
-
}
|
|
5407
|
+
var _a, _b, _c;
|
|
5408
|
+
this.unsetGetter();
|
|
5364
5409
|
this.disposed = true;
|
|
5365
5410
|
this.visualsManager.RemoveRegos({
|
|
5366
5411
|
menuItemId: this.item.id
|
|
5367
5412
|
});
|
|
5368
|
-
(
|
|
5369
|
-
(
|
|
5413
|
+
(_a = this.entityCheckRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
5414
|
+
(_b = this.viewMonitorRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
5370
5415
|
clearInterval(this.renderQueueInterval);
|
|
5371
5416
|
this.renderQueue = [];
|
|
5372
|
-
(
|
|
5417
|
+
(_c = this.clustering) === null || _c === void 0 ? void 0 : _c.Dispose();
|
|
5373
5418
|
};
|
|
5374
5419
|
Manager.prototype.ReRender = function (params) {
|
|
5375
5420
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -5423,6 +5468,24 @@
|
|
|
5423
5468
|
});
|
|
5424
5469
|
});
|
|
5425
5470
|
};
|
|
5471
|
+
Manager.prototype.UpdateSettings = function (params) {
|
|
5472
|
+
var CameraZoomSettings = params.zoomControl, queueRerender = params.queueRerender;
|
|
5473
|
+
if (this.disposed) {
|
|
5474
|
+
return;
|
|
5475
|
+
}
|
|
5476
|
+
if (CameraZoomSettings === null || CameraZoomSettings === void 0 ? void 0 : CameraZoomSettings.length) {
|
|
5477
|
+
this.item.CameraZoomSettings = CameraZoomSettings;
|
|
5478
|
+
this.setGetter();
|
|
5479
|
+
}
|
|
5480
|
+
if (queueRerender != false) {
|
|
5481
|
+
var entityIds = Object.keys(this.renderedEntities);
|
|
5482
|
+
this.visualsManager.MarkStale({
|
|
5483
|
+
entityIds: entityIds,
|
|
5484
|
+
menuItemIds: [this.item.id]
|
|
5485
|
+
});
|
|
5486
|
+
this.doEntityCheck(entityIds);
|
|
5487
|
+
}
|
|
5488
|
+
};
|
|
5426
5489
|
Manager.prototype.doEntityCheck = function (ids) {
|
|
5427
5490
|
return __awaiter(this, void 0, void 0, function () {
|
|
5428
5491
|
var api, checkBatch, e_2;
|
|
@@ -5699,6 +5762,23 @@
|
|
|
5699
5762
|
});
|
|
5700
5763
|
});
|
|
5701
5764
|
};
|
|
5765
|
+
Manager.prototype.UpdateSettings = function (params) {
|
|
5766
|
+
var CameraZoomSettings = params.zoomControl, queueRerender = params.queueRerender;
|
|
5767
|
+
if (this.disposed) {
|
|
5768
|
+
return;
|
|
5769
|
+
}
|
|
5770
|
+
if (CameraZoomSettings === null || CameraZoomSettings === void 0 ? void 0 : CameraZoomSettings.length) {
|
|
5771
|
+
this.item.CameraZoomSettings = CameraZoomSettings;
|
|
5772
|
+
}
|
|
5773
|
+
if (queueRerender != false) {
|
|
5774
|
+
var entityIds = Object.keys(this.renderedEntities);
|
|
5775
|
+
this.visualsManager.MarkStale({
|
|
5776
|
+
entityIds: entityIds,
|
|
5777
|
+
menuItemIds: [this.item.id]
|
|
5778
|
+
});
|
|
5779
|
+
this.doEntityCheck(entityIds);
|
|
5780
|
+
}
|
|
5781
|
+
};
|
|
5702
5782
|
Manager.prototype.doEntityCheck = function (ids, force) {
|
|
5703
5783
|
if (force === void 0) { force = false; }
|
|
5704
5784
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -5925,6 +6005,23 @@
|
|
|
5925
6005
|
});
|
|
5926
6006
|
});
|
|
5927
6007
|
};
|
|
6008
|
+
Manager.prototype.UpdateSettings = function (params) {
|
|
6009
|
+
var CameraZoomSettings = params.zoomControl, queueRerender = params.queueRerender;
|
|
6010
|
+
if (this.disposed) {
|
|
6011
|
+
return;
|
|
6012
|
+
}
|
|
6013
|
+
if (CameraZoomSettings === null || CameraZoomSettings === void 0 ? void 0 : CameraZoomSettings.length) {
|
|
6014
|
+
this.item.CameraZoomSettings = CameraZoomSettings;
|
|
6015
|
+
}
|
|
6016
|
+
if (queueRerender != false) {
|
|
6017
|
+
var entityIds = Object.keys(this.renderedEntities);
|
|
6018
|
+
this.visualsManager.MarkStale({
|
|
6019
|
+
entityIds: entityIds,
|
|
6020
|
+
menuItemIds: [this.item.id]
|
|
6021
|
+
});
|
|
6022
|
+
this.onGetterUpdate(entityIds);
|
|
6023
|
+
}
|
|
6024
|
+
};
|
|
5928
6025
|
Manager.prototype.onGetterUpdate = function (entityIds, force) {
|
|
5929
6026
|
if (force === void 0) { force = false; }
|
|
5930
6027
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -6155,6 +6252,23 @@
|
|
|
6155
6252
|
});
|
|
6156
6253
|
});
|
|
6157
6254
|
};
|
|
6255
|
+
Manager.prototype.UpdateSettings = function (params) {
|
|
6256
|
+
var CameraZoomSettings = params.zoomControl, queueRerender = params.queueRerender;
|
|
6257
|
+
if (this.disposed) {
|
|
6258
|
+
return;
|
|
6259
|
+
}
|
|
6260
|
+
if (CameraZoomSettings === null || CameraZoomSettings === void 0 ? void 0 : CameraZoomSettings.length) {
|
|
6261
|
+
this.item.CameraZoomSettings = CameraZoomSettings;
|
|
6262
|
+
}
|
|
6263
|
+
if (queueRerender != false) {
|
|
6264
|
+
var entityId = this.item.BruceEntity.EntityId;
|
|
6265
|
+
this.visualsManager.MarkStale({
|
|
6266
|
+
entityIds: [entityId],
|
|
6267
|
+
menuItemIds: [this.item.id]
|
|
6268
|
+
});
|
|
6269
|
+
this.onGetterUpdate(entityId, true);
|
|
6270
|
+
}
|
|
6271
|
+
};
|
|
6158
6272
|
Manager.prototype.renderEntity = function (entity, force) {
|
|
6159
6273
|
var _a;
|
|
6160
6274
|
if (force === void 0) { force = false; }
|
|
@@ -9090,7 +9204,7 @@
|
|
|
9090
9204
|
if (rItem.renderManager && !((_c = rItem.renderManager) === null || _c === void 0 ? void 0 : _c.Disposed)) {
|
|
9091
9205
|
(_d = this.onUpdate) === null || _d === void 0 ? void 0 : _d.Trigger({ isEnabling: true, itemId: rItem.id });
|
|
9092
9206
|
}
|
|
9093
|
-
rItem.id;
|
|
9207
|
+
return rItem.id;
|
|
9094
9208
|
};
|
|
9095
9209
|
/**
|
|
9096
9210
|
* Disables a menu item by its id.
|
|
@@ -14662,6 +14776,30 @@
|
|
|
14662
14776
|
}(Widget.AWidget));
|
|
14663
14777
|
|
|
14664
14778
|
var CESIUM_VIEWER_MANAGER_KEY = "_cesiumViewerManager";
|
|
14779
|
+
/**
|
|
14780
|
+
* Bug related to entities not being visible after they were added then a render was requested.
|
|
14781
|
+
* It was 4 point entities in York. They would not appear until a request render was recalled.
|
|
14782
|
+
* Adding this slow render loop as a band-aid fix.
|
|
14783
|
+
*/
|
|
14784
|
+
var BACKGROUND_RENDERING_KEY = "_backgroundRendering";
|
|
14785
|
+
function backgroundRendering(viewer) {
|
|
14786
|
+
if (viewer[BACKGROUND_RENDERING_KEY]) {
|
|
14787
|
+
return;
|
|
14788
|
+
}
|
|
14789
|
+
viewer[BACKGROUND_RENDERING_KEY] = true;
|
|
14790
|
+
var interval = setInterval(function () {
|
|
14791
|
+
if (!(viewer === null || viewer === void 0 ? void 0 : viewer.scene) || viewer.isDestroyed()) {
|
|
14792
|
+
clearInterval(interval);
|
|
14793
|
+
return;
|
|
14794
|
+
}
|
|
14795
|
+
// Check if last render time is greater than 3 seconds ago.
|
|
14796
|
+
// We check in case something else is also requesting renders.
|
|
14797
|
+
var lastRenderTime = viewer.scene.lastRenderTime;
|
|
14798
|
+
if (!lastRenderTime || Cesium.JulianDate.secondsDifference(Cesium.JulianDate.now(), lastRenderTime) > 3) {
|
|
14799
|
+
viewer.scene.requestRender();
|
|
14800
|
+
}
|
|
14801
|
+
}, 3500);
|
|
14802
|
+
}
|
|
14665
14803
|
(function (ViewerUtils) {
|
|
14666
14804
|
/**
|
|
14667
14805
|
* Destroys all the junk that cesium viewer ships with.
|
|
@@ -14686,6 +14824,7 @@
|
|
|
14686
14824
|
viewer: viewer
|
|
14687
14825
|
});
|
|
14688
14826
|
}
|
|
14827
|
+
backgroundRendering(viewer);
|
|
14689
14828
|
return data;
|
|
14690
14829
|
}
|
|
14691
14830
|
ViewerUtils.InitViewer = InitViewer;
|
|
@@ -14703,6 +14842,9 @@
|
|
|
14703
14842
|
var _a;
|
|
14704
14843
|
var viewer = params.viewer;
|
|
14705
14844
|
var container = viewer.container;
|
|
14845
|
+
if (!container.style.position) {
|
|
14846
|
+
container.style.position = "relative";
|
|
14847
|
+
}
|
|
14706
14848
|
var genContainer = (_a = container.getElementsByClassName("cesium-viewer")) === null || _a === void 0 ? void 0 : _a[0];
|
|
14707
14849
|
if (genContainer) {
|
|
14708
14850
|
var children = genContainer.children;
|
|
@@ -14806,7 +14948,7 @@
|
|
|
14806
14948
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
14807
14949
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
14808
14950
|
|
|
14809
|
-
var VERSION$1 = "2.5.
|
|
14951
|
+
var VERSION$1 = "2.5.4";
|
|
14810
14952
|
|
|
14811
14953
|
exports.VERSION = VERSION$1;
|
|
14812
14954
|
exports.CesiumViewMonitor = CesiumViewMonitor;
|