bruce-cesium 7.6.6 → 7.6.8
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 +512 -60
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +505 -57
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +2 -1
- package/dist/lib/bruce-cesium.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-model3d.js +17 -10
- package/dist/lib/rendering/entity-render-engine-model3d.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-point.js +3 -1
- package/dist/lib/rendering/entity-render-engine-point.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js +3 -1
- package/dist/lib/rendering/entity-render-engine-polygon.js.map +1 -1
- package/dist/lib/rendering/entity-render-engine-polyline.js +3 -1
- package/dist/lib/rendering/entity-render-engine-polyline.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +132 -2
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/menu-item-style-overlay.js +213 -0
- package/dist/lib/rendering/menu-item-style-overlay.js.map +1 -0
- package/dist/lib/rendering/menu-item-styles.js +9 -4
- package/dist/lib/rendering/menu-item-styles.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-datalab-render-manager.js +31 -8
- package/dist/lib/rendering/render-managers/entities/entities-datalab-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-ids-render-manager.js +9 -4
- 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 +10 -3
- 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 +26 -7
- 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 +8 -2
- package/dist/lib/rendering/render-managers/entities/entity-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/render-manager.js +4 -3
- package/dist/lib/rendering/render-managers/render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js +4 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-arb-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js +5 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-cad-render-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js +5 -1
- package/dist/lib/rendering/render-managers/tilesets/tileset-entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/tileset-styler.js +42 -7
- package/dist/lib/rendering/tileset-styler.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +2 -1
- package/dist/types/rendering/menu-item-manager.d.ts +23 -1
- package/dist/types/rendering/menu-item-style-overlay.d.ts +57 -0
- package/dist/types/rendering/menu-item-styles.d.ts +1 -1
- package/dist/types/rendering/render-managers/entities/entities-datalab-render-manager.d.ts +1 -0
- package/dist/types/rendering/render-managers/entities/entities-render-manager.d.ts +1 -0
- package/dist/types/rendering/tileset-styler.d.ts +5 -0
- package/package.json +2 -2
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Cesium from 'cesium';
|
|
2
|
-
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature,
|
|
3
|
-
import { Cartes, LRUCache, ProjectViewTile, ENVIRONMENT, Calculator, ClientFile, Entity as Entity$1, EntityLod, EntityTag, EntityType, ObjectUtils, Style, UrlUtils, Api,
|
|
2
|
+
import { Cartographic, ColorMaterialProperty, Entity, Color, ConstantProperty, CallbackProperty, Primitive, Cesium3DTileFeature, ConstantPositionProperty, HeightReference, DistanceDisplayCondition, Math as Math$1, Cartesian3, JulianDate, Quaternion, Transforms, HeadingPitchRoll, Matrix4, ColorBlendMode, ShadowMode, ClassificationType, Model, HorizontalOrigin, VerticalOrigin, ShaderSource, Ellipsoid, Geometry, GeometryAttribute, ComponentDatatype, PrimitiveType, BoundingSphere, GeometryPipeline, Cartesian2, Cartesian4, sampleTerrain, Texture, PixelFormat, Sampler, TextureWrap, TextureMinificationFilter, TextureMagnificationFilter, PixelDatatype, VertexArray, BufferUsage, ShaderProgram, RenderState, BlendingState, DrawCommand, Pass, ArcType, CornerType, ImageMaterialProperty, PolygonHierarchy, PolylineGraphics, Rectangle, SceneMode, IntersectionTests, Ray, SceneTransforms, NearFarScalar, Matrix3, KmlDataSource, FeatureDetection, GeoJsonDataSource, Cesium3DTileStyle, HeadingPitchRange, Cesium3DTileColorBlendMode, Ion, IonResource, OrthographicFrustum, EasingFunction, Cesium3DTileset, Intersect, EllipsoidTerrainProvider, IonImageryProvider, createWorldImagery, createWorldImageryAsync, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, CesiumTerrainProvider, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, EllipsoidGeodesic, sampleTerrainMostDetailed, defined, PolygonPipeline, CustomDataSource, GeometryInstance, CesiumInspector, ClockRange, DynamicEnvironmentMapManager, ScreenSpaceEventHandler, ScreenSpaceEventType, Fullscreen, CzmlDataSource } from 'cesium';
|
|
3
|
+
import { Cartes, LRUCache, ProjectViewTile, ENVIRONMENT, Calculator, ClientFile, Entity as Entity$1, EntityLod, EntityTag, EntityType, ObjectUtils, Style, UrlUtils, Api, Carto, Geometry as Geometry$1, Bounds, ClientFileValueMap, Color as Color$1, MenuItem, ProjectView, ProjectViewBookmark, Tileset, ZoomControl, BruceEvent, EntityCoords, DelayQueue, DataLab, AccountConcept, RecordChangeFeed, BruceApi, EntityRelation, EntitySource, Camera, ProgramKey, ProjectViewLegacyTile, Account, AccountLimits, Session, EntityAttachment, EntityAttachmentType, EntityAttribute, MathUtils, ProjectViewBookmarkGroup, EntityRelationType, EntityHistoricData } from 'bruce-models';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Ensures a number is returned from a given value.
|
|
@@ -16432,6 +16432,215 @@ class HistoricGatherer {
|
|
|
16432
16432
|
// whatever the writer's clock and this one disagree by.
|
|
16433
16433
|
HistoricGatherer.LIVE_TAIL_MS = 15000;
|
|
16434
16434
|
|
|
16435
|
+
/**
|
|
16436
|
+
* Lays one style over every menu item that can take it, changing only what that style sets.
|
|
16437
|
+
*/
|
|
16438
|
+
var MenuItemStyleOverlay;
|
|
16439
|
+
(function (MenuItemStyleOverlay) {
|
|
16440
|
+
// Tileset items whose render manager runs a Styler, given the item settings that make it run one.
|
|
16441
|
+
const TILESET_TYPES = [
|
|
16442
|
+
MenuItem.EType.CadTileset,
|
|
16443
|
+
MenuItem.EType.ArbTileset,
|
|
16444
|
+
MenuItem.EType.IonTileset,
|
|
16445
|
+
MenuItem.EType.EntityTileset
|
|
16446
|
+
];
|
|
16447
|
+
// Items whose style resolves per Entity from their zoom control rows.
|
|
16448
|
+
const ZOOM_CONTROL_TYPES = [
|
|
16449
|
+
MenuItem.EType.Entities,
|
|
16450
|
+
MenuItem.EType.Entity,
|
|
16451
|
+
MenuItem.EType.EntitiesIds,
|
|
16452
|
+
MenuItem.EType.EntitiesLoaded,
|
|
16453
|
+
MenuItem.EType.DataLab
|
|
16454
|
+
];
|
|
16455
|
+
/**
|
|
16456
|
+
* Returns the base style with each field the overlay sets laid over it.
|
|
16457
|
+
*/
|
|
16458
|
+
function Merge(base, overlay) {
|
|
16459
|
+
var _a, _b;
|
|
16460
|
+
if (!overlay) {
|
|
16461
|
+
return base;
|
|
16462
|
+
}
|
|
16463
|
+
const merged = { ...(base !== null && base !== void 0 ? base : {}) };
|
|
16464
|
+
for (const key of Object.keys(overlay)) {
|
|
16465
|
+
const value = overlay[key];
|
|
16466
|
+
if (!isSet(value)) {
|
|
16467
|
+
continue;
|
|
16468
|
+
}
|
|
16469
|
+
if (isPlainObject(value)) {
|
|
16470
|
+
merged[key] = { ...((_a = merged[key]) !== null && _a !== void 0 ? _a : {}), ...pickSet(value) };
|
|
16471
|
+
}
|
|
16472
|
+
else {
|
|
16473
|
+
merged[key] = value;
|
|
16474
|
+
}
|
|
16475
|
+
}
|
|
16476
|
+
// Tilesets only paint a customised model style, and an overlay that sets a colour wants painting.
|
|
16477
|
+
if (isSet((_b = overlay.modelStyle) === null || _b === void 0 ? void 0 : _b.fillColor) && overlay.modelStyle.customize == null) {
|
|
16478
|
+
merged.modelStyle = { ...merged.modelStyle, customize: true };
|
|
16479
|
+
}
|
|
16480
|
+
return merged;
|
|
16481
|
+
}
|
|
16482
|
+
MenuItemStyleOverlay.Merge = Merge;
|
|
16483
|
+
/**
|
|
16484
|
+
* Returns the overlay a zoom control row carries laid over the style it resolved.
|
|
16485
|
+
*/
|
|
16486
|
+
function ApplyRow(style, row) {
|
|
16487
|
+
return Merge(style, row === null || row === void 0 ? void 0 : row.StyleOverlay);
|
|
16488
|
+
}
|
|
16489
|
+
MenuItemStyleOverlay.ApplyRow = ApplyRow;
|
|
16490
|
+
/**
|
|
16491
|
+
* Returns true when the item renders through a path that honours an overlay.
|
|
16492
|
+
*/
|
|
16493
|
+
function Supports(item) {
|
|
16494
|
+
if (ZOOM_CONTROL_TYPES.includes(item === null || item === void 0 ? void 0 : item.Type)) {
|
|
16495
|
+
return true;
|
|
16496
|
+
}
|
|
16497
|
+
if (!TILESET_TYPES.includes(item === null || item === void 0 ? void 0 : item.Type)) {
|
|
16498
|
+
return false;
|
|
16499
|
+
}
|
|
16500
|
+
// These two only run a Styler when asked to.
|
|
16501
|
+
if (item.Type === MenuItem.EType.ArbTileset || item.Type === MenuItem.EType.EntityTileset) {
|
|
16502
|
+
return Boolean(item.ApplyStyles);
|
|
16503
|
+
}
|
|
16504
|
+
return true;
|
|
16505
|
+
}
|
|
16506
|
+
MenuItemStyleOverlay.Supports = Supports;
|
|
16507
|
+
/**
|
|
16508
|
+
* Returns the overlay laid on the item, or null when it carries none.
|
|
16509
|
+
*/
|
|
16510
|
+
function Get(item) {
|
|
16511
|
+
var _a, _b, _c;
|
|
16512
|
+
if (TILESET_TYPES.includes(item === null || item === void 0 ? void 0 : item.Type)) {
|
|
16513
|
+
return (_a = item.styleOverlay) !== null && _a !== void 0 ? _a : null;
|
|
16514
|
+
}
|
|
16515
|
+
if (ZOOM_CONTROL_TYPES.includes(item === null || item === void 0 ? void 0 : item.Type)) {
|
|
16516
|
+
const rows = item.CameraZoomSettings;
|
|
16517
|
+
return (_c = (_b = rows === null || rows === void 0 ? void 0 : rows.find(x => x === null || x === void 0 ? void 0 : x.StyleOverlay)) === null || _b === void 0 ? void 0 : _b.StyleOverlay) !== null && _c !== void 0 ? _c : null;
|
|
16518
|
+
}
|
|
16519
|
+
return null;
|
|
16520
|
+
}
|
|
16521
|
+
MenuItemStyleOverlay.Get = Get;
|
|
16522
|
+
/**
|
|
16523
|
+
* Returns a copy carrying the overlay, or the item itself when it cannot take one and carries none.
|
|
16524
|
+
*/
|
|
16525
|
+
function With(item, overlay) {
|
|
16526
|
+
var _a;
|
|
16527
|
+
const target = Supports(item) ? overlay : null;
|
|
16528
|
+
if (!target && !Get(item)) {
|
|
16529
|
+
return item;
|
|
16530
|
+
}
|
|
16531
|
+
if (TILESET_TYPES.includes(item.Type)) {
|
|
16532
|
+
const next = { ...item };
|
|
16533
|
+
if (target) {
|
|
16534
|
+
next.styleOverlay = target;
|
|
16535
|
+
}
|
|
16536
|
+
else {
|
|
16537
|
+
delete next.styleOverlay;
|
|
16538
|
+
}
|
|
16539
|
+
return next;
|
|
16540
|
+
}
|
|
16541
|
+
const zItem = item;
|
|
16542
|
+
return {
|
|
16543
|
+
...zItem,
|
|
16544
|
+
CameraZoomSettings: ((_a = zItem.CameraZoomSettings) !== null && _a !== void 0 ? _a : []).map(row => {
|
|
16545
|
+
const next = { ...row };
|
|
16546
|
+
if (target) {
|
|
16547
|
+
next.StyleOverlay = target;
|
|
16548
|
+
}
|
|
16549
|
+
else {
|
|
16550
|
+
delete next.StyleOverlay;
|
|
16551
|
+
}
|
|
16552
|
+
return next;
|
|
16553
|
+
})
|
|
16554
|
+
};
|
|
16555
|
+
}
|
|
16556
|
+
MenuItemStyleOverlay.With = With;
|
|
16557
|
+
/**
|
|
16558
|
+
* Returns the style a bookmark laid on this one item, or null when it carries none.
|
|
16559
|
+
*/
|
|
16560
|
+
function GetItemStyle(item) {
|
|
16561
|
+
var _a, _b;
|
|
16562
|
+
return (_b = (_a = item === null || item === void 0 ? void 0 : item.style) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : null;
|
|
16563
|
+
}
|
|
16564
|
+
MenuItemStyleOverlay.GetItemStyle = GetItemStyle;
|
|
16565
|
+
/**
|
|
16566
|
+
* Returns the Style record a bookmark laid on this one item, or null when it names none.
|
|
16567
|
+
*/
|
|
16568
|
+
function GetItemStyleId(item) {
|
|
16569
|
+
var _a;
|
|
16570
|
+
const styleId = (_a = item === null || item === void 0 ? void 0 : item.style) === null || _a === void 0 ? void 0 : _a.styleId;
|
|
16571
|
+
return styleId == null || styleId === "" || styleId == -1 ? null : styleId;
|
|
16572
|
+
}
|
|
16573
|
+
MenuItemStyleOverlay.GetItemStyleId = GetItemStyleId;
|
|
16574
|
+
/**
|
|
16575
|
+
* Returns a copy carrying the given bookmark style, inline or by record, or without one for null.
|
|
16576
|
+
*/
|
|
16577
|
+
function WithItemStyle(item, itemStyle) {
|
|
16578
|
+
const has = Boolean(itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.style) || (itemStyle === null || itemStyle === void 0 ? void 0 : itemStyle.styleId) != null;
|
|
16579
|
+
if (!item || (!has && !item.style)) {
|
|
16580
|
+
return item;
|
|
16581
|
+
}
|
|
16582
|
+
const next = { ...item };
|
|
16583
|
+
if (has) {
|
|
16584
|
+
next.style = { ...itemStyle };
|
|
16585
|
+
}
|
|
16586
|
+
else {
|
|
16587
|
+
delete next.style;
|
|
16588
|
+
}
|
|
16589
|
+
return next;
|
|
16590
|
+
}
|
|
16591
|
+
MenuItemStyleOverlay.WithItemStyle = WithItemStyle;
|
|
16592
|
+
/**
|
|
16593
|
+
* Returns the overlay an item renders with: its inline or loaded bookmark style, under the scene-wide one.
|
|
16594
|
+
*/
|
|
16595
|
+
function Effective(item, overlay, record) {
|
|
16596
|
+
var _a, _b;
|
|
16597
|
+
const own = (_b = (_a = GetItemStyle(item)) !== null && _a !== void 0 ? _a : record) !== null && _b !== void 0 ? _b : null;
|
|
16598
|
+
// Either alone is used as it is, so an unchanged overlay still compares equal.
|
|
16599
|
+
return own ? Merge(own, overlay) : overlay;
|
|
16600
|
+
}
|
|
16601
|
+
MenuItemStyleOverlay.Effective = Effective;
|
|
16602
|
+
/**
|
|
16603
|
+
* Returns a copy without its overlay or bookmark style, so what else two items differ by can be compared.
|
|
16604
|
+
*/
|
|
16605
|
+
function Strip(item) {
|
|
16606
|
+
return With(WithItemStyle(item, null), null);
|
|
16607
|
+
}
|
|
16608
|
+
MenuItemStyleOverlay.Strip = Strip;
|
|
16609
|
+
/**
|
|
16610
|
+
* Returns true when the two items differ by nothing but their overlay or bookmark style.
|
|
16611
|
+
*/
|
|
16612
|
+
function IsChangeOnly(from, to) {
|
|
16613
|
+
if (!from || !to || from.Type !== to.Type) {
|
|
16614
|
+
return false;
|
|
16615
|
+
}
|
|
16616
|
+
const sameOverlay = JSON.stringify(Get(from)) === JSON.stringify(Get(to));
|
|
16617
|
+
if (sameOverlay && JSON.stringify(from.style) === JSON.stringify(to.style)) {
|
|
16618
|
+
return false;
|
|
16619
|
+
}
|
|
16620
|
+
// Removing keys keeps the order of the rest, so the two compare as text.
|
|
16621
|
+
return JSON.stringify(Strip(from)) === JSON.stringify(Strip(to));
|
|
16622
|
+
}
|
|
16623
|
+
MenuItemStyleOverlay.IsChangeOnly = IsChangeOnly;
|
|
16624
|
+
/*
|
|
16625
|
+
* Returns false for what leaves the base value in place: unset, null, or an empty Calculator field list.
|
|
16626
|
+
*/
|
|
16627
|
+
function isSet(value) {
|
|
16628
|
+
return value !== undefined && value !== null && !(Array.isArray(value) && !value.length);
|
|
16629
|
+
}
|
|
16630
|
+
function isPlainObject(value) {
|
|
16631
|
+
return typeof value === "object" && !Array.isArray(value);
|
|
16632
|
+
}
|
|
16633
|
+
function pickSet(value) {
|
|
16634
|
+
const picked = {};
|
|
16635
|
+
for (const key of Object.keys(value)) {
|
|
16636
|
+
if (isSet(value[key])) {
|
|
16637
|
+
picked[key] = value[key];
|
|
16638
|
+
}
|
|
16639
|
+
}
|
|
16640
|
+
return picked;
|
|
16641
|
+
}
|
|
16642
|
+
})(MenuItemStyleOverlay || (MenuItemStyleOverlay = {}));
|
|
16643
|
+
|
|
16435
16644
|
const BATCH_SIZE = 500;
|
|
16436
16645
|
const CHECK_BATCH_SIZE = 250;
|
|
16437
16646
|
function getValue$2(viewer, obj) {
|
|
@@ -16492,6 +16701,8 @@ var EntitiesRenderManager;
|
|
|
16492
16701
|
this.isRunningCheck = false;
|
|
16493
16702
|
this.viewMonitorRemoval = null;
|
|
16494
16703
|
this.renderQueue = [];
|
|
16704
|
+
// Queued Entities a caller handed in, drawn even when the skip gate sees nothing changed.
|
|
16705
|
+
this.renderQueueForced = new Set();
|
|
16495
16706
|
this.renderQueueInterval = null;
|
|
16496
16707
|
this.sources = [];
|
|
16497
16708
|
// Highly experimental flag to try improve rendering large sets of polygons and polylines.
|
|
@@ -16586,6 +16797,7 @@ var EntitiesRenderManager;
|
|
|
16586
16797
|
clearInterval(this.renderQueueInterval);
|
|
16587
16798
|
this.renderQueueInterval = null;
|
|
16588
16799
|
this.renderQueue = [];
|
|
16800
|
+
this.renderQueueForced.clear();
|
|
16589
16801
|
// Remove just the ones that shouldn't be rendered.
|
|
16590
16802
|
// Eg: for a tag menu item we can see what tags are selected and only render those.
|
|
16591
16803
|
if (shouldRender) {
|
|
@@ -16896,6 +17108,7 @@ var EntitiesRenderManager;
|
|
|
16896
17108
|
(_b = this.viewMonitorRemoval) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
16897
17109
|
clearInterval(this.renderQueueInterval);
|
|
16898
17110
|
this.renderQueue = [];
|
|
17111
|
+
this.renderQueueForced.clear();
|
|
16899
17112
|
(_c = this.clustering) === null || _c === void 0 ? void 0 : _c.Dispose();
|
|
16900
17113
|
this.clustering = null;
|
|
16901
17114
|
for (let i = 0; i < this.sources.length; i++) {
|
|
@@ -16984,7 +17197,8 @@ var EntitiesRenderManager;
|
|
|
16984
17197
|
}
|
|
16985
17198
|
else {
|
|
16986
17199
|
if (entities === null || entities === void 0 ? void 0 : entities.length) {
|
|
16987
|
-
|
|
17200
|
+
// The skip gate cannot see an edited copy, so handed-in Entities are drawn forced.
|
|
17201
|
+
this.distributeForRender(entities, true);
|
|
16988
17202
|
}
|
|
16989
17203
|
else {
|
|
16990
17204
|
await this.doEntityCheck(entityIds);
|
|
@@ -17135,12 +17349,22 @@ var EntitiesRenderManager;
|
|
|
17135
17349
|
}
|
|
17136
17350
|
this.isRunningCheck = false;
|
|
17137
17351
|
}
|
|
17138
|
-
distributeForRender(entities) {
|
|
17352
|
+
distributeForRender(entities, force = false) {
|
|
17353
|
+
if (force) {
|
|
17354
|
+
entities.forEach(x => this.renderQueueForced.add(x));
|
|
17355
|
+
}
|
|
17139
17356
|
this.renderQueue = this.renderQueue.concat(entities);
|
|
17140
17357
|
if (!this.renderQueueInterval && this.renderQueue.length) {
|
|
17141
17358
|
this.renderQueueInterval = setInterval(() => {
|
|
17142
17359
|
const batch = this.renderQueue.splice(0, BATCH_SIZE);
|
|
17143
|
-
this.
|
|
17360
|
+
const forced = new Set(batch.filter(x => this.renderQueueForced.delete(x)));
|
|
17361
|
+
const rest = batch.filter(x => !forced.has(x));
|
|
17362
|
+
if (forced.size) {
|
|
17363
|
+
this.renderEntities(Array.from(forced), true);
|
|
17364
|
+
}
|
|
17365
|
+
if (rest.length) {
|
|
17366
|
+
this.renderEntities(rest);
|
|
17367
|
+
}
|
|
17144
17368
|
if (this.renderQueue.length <= 0) {
|
|
17145
17369
|
clearInterval(this.renderQueueInterval);
|
|
17146
17370
|
this.renderQueueInterval = null;
|
|
@@ -17276,6 +17500,7 @@ var EntitiesRenderManager;
|
|
|
17276
17500
|
console.error(e);
|
|
17277
17501
|
}
|
|
17278
17502
|
}
|
|
17503
|
+
style = MenuItemStyleOverlay.ApplyRow(style, zoomItem);
|
|
17279
17504
|
const pStyle = (_g = style === null || style === void 0 ? void 0 : style.polygonStyle) !== null && _g !== void 0 ? _g : {};
|
|
17280
17505
|
const lStyle = (_h = style === null || style === void 0 ? void 0 : style.polylineStyle) !== null && _h !== void 0 ? _h : {};
|
|
17281
17506
|
const polygonsClamped = ((_j = pStyle === null || pStyle === void 0 ? void 0 : pStyle.altitudeOption) === null || _j === void 0 ? void 0 : _j.id) == null ? true : ((_k = pStyle === null || pStyle === void 0 ? void 0 : pStyle.altitudeOption) === null || _k === void 0 ? void 0 : _k.id) == 0;
|
|
@@ -17567,7 +17792,7 @@ var EntitiesRenderManager;
|
|
|
17567
17792
|
return recordsByIds;
|
|
17568
17793
|
}
|
|
17569
17794
|
async doRenderAsIndividuals(entities, force = false) {
|
|
17570
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
17795
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
17571
17796
|
// When live we just want to show the latest pos.
|
|
17572
17797
|
// When not live, the user might scroll the timeline and want to see it a fluid animation between points in time.
|
|
17573
17798
|
const isLive = ViewUtils.GetTimeDetails({
|
|
@@ -17671,8 +17896,9 @@ var EntitiesRenderManager;
|
|
|
17671
17896
|
rego.schema = (_h = entity.Bruce) === null || _h === void 0 ? void 0 : _h.Schema;
|
|
17672
17897
|
rego.canEdit = canEdit;
|
|
17673
17898
|
rego.internalId = (_k = (_j = entity.Bruce) === null || _j === void 0 ? void 0 : _j.InternalID) !== null && _k !== void 0 ? _k : rego.internalId;
|
|
17674
|
-
|
|
17675
|
-
rego.
|
|
17899
|
+
// Assigned outright, so a restyle that traces nothing clears the old key.
|
|
17900
|
+
rego.styleId = cEntity.styleId;
|
|
17901
|
+
rego.styleEffective = cEntity.styleEffective;
|
|
17676
17902
|
// Marked as stale meaning some change was performed that requires a refresh.
|
|
17677
17903
|
// This usually means a new sibling was added that we need to update.
|
|
17678
17904
|
if (rego.stale) {
|
|
@@ -17702,7 +17928,7 @@ var EntitiesRenderManager;
|
|
|
17702
17928
|
menuItemId: this.item.id,
|
|
17703
17929
|
requestRender: false
|
|
17704
17930
|
});
|
|
17705
|
-
(
|
|
17931
|
+
(_l = this.clustering) === null || _l === void 0 ? void 0 : _l.RemoveEntity(id, false);
|
|
17706
17932
|
}
|
|
17707
17933
|
}
|
|
17708
17934
|
this.viewer.scene.requestRender();
|
|
@@ -17781,6 +18007,7 @@ var EntitiesRenderManager;
|
|
|
17781
18007
|
clearInterval(this.renderQueueInterval);
|
|
17782
18008
|
this.renderQueueInterval = null;
|
|
17783
18009
|
this.renderQueue = [];
|
|
18010
|
+
this.renderQueueForced.clear();
|
|
17784
18011
|
this.disposed = true;
|
|
17785
18012
|
return payload;
|
|
17786
18013
|
}
|
|
@@ -18143,7 +18370,8 @@ var EntitiesLoadedRenderManager;
|
|
|
18143
18370
|
menuItemIds: [this.item.id]
|
|
18144
18371
|
});
|
|
18145
18372
|
if (entities === null || entities === void 0 ? void 0 : entities.length) {
|
|
18146
|
-
|
|
18373
|
+
// The skip gate cannot see an edited copy, so handed-in Entities are drawn forced.
|
|
18374
|
+
this.onGetterUpdate(entities, true);
|
|
18147
18375
|
}
|
|
18148
18376
|
else {
|
|
18149
18377
|
this.doEntityCheck(entityIds, force);
|
|
@@ -18377,6 +18605,7 @@ var EntitiesLoadedRenderManager;
|
|
|
18377
18605
|
if (!style) {
|
|
18378
18606
|
style = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.Style;
|
|
18379
18607
|
}
|
|
18608
|
+
style = MenuItemStyleOverlay.ApplyRow(style, zoomItem);
|
|
18380
18609
|
const pStyle = (_h = style === null || style === void 0 ? void 0 : style.polygonStyle) !== null && _h !== void 0 ? _h : {};
|
|
18381
18610
|
const lStyle = (_j = style === null || style === void 0 ? void 0 : style.polylineStyle) !== null && _j !== void 0 ? _j : {};
|
|
18382
18611
|
const polygonsClamped = ((_k = pStyle === null || pStyle === void 0 ? void 0 : pStyle.altitudeOption) === null || _k === void 0 ? void 0 : _k.id) == null ? true : ((_l = pStyle === null || pStyle === void 0 ? void 0 : pStyle.altitudeOption) === null || _l === void 0 ? void 0 : _l.id) == 0;
|
|
@@ -18621,7 +18850,7 @@ var EntitiesLoadedRenderManager;
|
|
|
18621
18850
|
return next;
|
|
18622
18851
|
}
|
|
18623
18852
|
async doRenderAsIndividuals(entities, force = false) {
|
|
18624
|
-
var _a;
|
|
18853
|
+
var _a, _b, _c;
|
|
18625
18854
|
const { updated, entities: cEntities } = await EntityRenderEngine.Render({
|
|
18626
18855
|
viewer: this.viewer,
|
|
18627
18856
|
apiGetter: this.apiGetter,
|
|
@@ -18675,7 +18904,9 @@ var EntitiesLoadedRenderManager;
|
|
|
18675
18904
|
priority: this.renderPriority,
|
|
18676
18905
|
entityTypeId: entity.Bruce["EntityType.ID"],
|
|
18677
18906
|
accountId: this.apiGetter.accountId,
|
|
18678
|
-
name: cEntity.name
|
|
18907
|
+
name: cEntity.name,
|
|
18908
|
+
styleId: (_b = cEntity.styleId) !== null && _b !== void 0 ? _b : undefined,
|
|
18909
|
+
styleEffective: (_c = cEntity.styleEffective) !== null && _c !== void 0 ? _c : undefined
|
|
18679
18910
|
},
|
|
18680
18911
|
requestRender: false
|
|
18681
18912
|
});
|
|
@@ -18683,6 +18914,8 @@ var EntitiesLoadedRenderManager;
|
|
|
18683
18914
|
else if (updated.get(id) && rego) {
|
|
18684
18915
|
rego.visual = cEntity;
|
|
18685
18916
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
18917
|
+
rego.styleId = cEntity.styleId;
|
|
18918
|
+
rego.styleEffective = cEntity.styleEffective;
|
|
18686
18919
|
rego.name = cEntity.name;
|
|
18687
18920
|
// We manually trigger an update event since the graphic was updated but not recreated.
|
|
18688
18921
|
this.visualsManager.OnUpdate.Trigger({
|
|
@@ -18862,7 +19095,8 @@ var EntitiesIdsRenderManager;
|
|
|
18862
19095
|
menuItemIds: [this.item.id]
|
|
18863
19096
|
});
|
|
18864
19097
|
if (entities === null || entities === void 0 ? void 0 : entities.length) {
|
|
18865
|
-
|
|
19098
|
+
// The skip gate cannot see an edited copy, so handed-in Entities are drawn forced.
|
|
19099
|
+
this.renderEntities(entities, true);
|
|
18866
19100
|
}
|
|
18867
19101
|
else {
|
|
18868
19102
|
this.onGetterUpdate(entityIds, force);
|
|
@@ -19074,7 +19308,7 @@ var EntitiesIdsRenderManager;
|
|
|
19074
19308
|
* @returns
|
|
19075
19309
|
*/
|
|
19076
19310
|
async renderAsIndividuals(entities, force = false) {
|
|
19077
|
-
var _a;
|
|
19311
|
+
var _a, _b, _c;
|
|
19078
19312
|
if (this.disposed || this.viewer.isDestroyed() || !entities.length) {
|
|
19079
19313
|
return;
|
|
19080
19314
|
}
|
|
@@ -19133,7 +19367,9 @@ var EntitiesIdsRenderManager;
|
|
|
19133
19367
|
entityTypeId: entity.Bruce["EntityType.ID"],
|
|
19134
19368
|
accountId: this.apiGetter.accountId,
|
|
19135
19369
|
overrideShow: clustered ? false : null,
|
|
19136
|
-
name: cEntity.name
|
|
19370
|
+
name: cEntity.name,
|
|
19371
|
+
styleId: (_a = cEntity.styleId) !== null && _a !== void 0 ? _a : undefined,
|
|
19372
|
+
styleEffective: (_b = cEntity.styleEffective) !== null && _b !== void 0 ? _b : undefined
|
|
19137
19373
|
},
|
|
19138
19374
|
requestRender: false
|
|
19139
19375
|
});
|
|
@@ -19141,6 +19377,8 @@ var EntitiesIdsRenderManager;
|
|
|
19141
19377
|
else if (updated.get(id) && rego) {
|
|
19142
19378
|
rego.visual = cEntity;
|
|
19143
19379
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
19380
|
+
rego.styleId = cEntity.styleId;
|
|
19381
|
+
rego.styleEffective = cEntity.styleEffective;
|
|
19144
19382
|
rego.name = cEntity.name;
|
|
19145
19383
|
// We manually trigger an update event since the graphic was updated but not recreated.
|
|
19146
19384
|
this.visualsManager.OnUpdate.Trigger({
|
|
@@ -19156,7 +19394,7 @@ var EntitiesIdsRenderManager;
|
|
|
19156
19394
|
menuItemId: this.item.id,
|
|
19157
19395
|
requestRender: false
|
|
19158
19396
|
});
|
|
19159
|
-
(
|
|
19397
|
+
(_c = this.clustering) === null || _c === void 0 ? void 0 : _c.RemoveEntity(id, false);
|
|
19160
19398
|
}
|
|
19161
19399
|
}
|
|
19162
19400
|
if (!this.disposed) {
|
|
@@ -19306,7 +19544,8 @@ var EntityRenderManager;
|
|
|
19306
19544
|
menuItemIds: [this.item.id]
|
|
19307
19545
|
});
|
|
19308
19546
|
if (incoming) {
|
|
19309
|
-
|
|
19547
|
+
// The skip gate cannot see an edited copy, so handed-in Entities are drawn forced.
|
|
19548
|
+
await this.renderEntity(incoming, true);
|
|
19310
19549
|
}
|
|
19311
19550
|
else {
|
|
19312
19551
|
await this.onGetterUpdate(itemEntityId, force);
|
|
@@ -19380,6 +19619,7 @@ var EntityRenderManager;
|
|
|
19380
19619
|
return next;
|
|
19381
19620
|
}
|
|
19382
19621
|
async doRenderEntity(entity, force = false) {
|
|
19622
|
+
var _a, _b;
|
|
19383
19623
|
try {
|
|
19384
19624
|
if (this.disposed || this.viewer.isDestroyed()) {
|
|
19385
19625
|
return;
|
|
@@ -19412,7 +19652,9 @@ var EntityRenderManager;
|
|
|
19412
19652
|
priority: this.renderPriority,
|
|
19413
19653
|
entityTypeId: entity.Bruce["EntityType.ID"],
|
|
19414
19654
|
accountId: this.apiGetter.accountId,
|
|
19415
|
-
name: cEntity.name
|
|
19655
|
+
name: cEntity.name,
|
|
19656
|
+
styleId: (_a = cEntity.styleId) !== null && _a !== void 0 ? _a : undefined,
|
|
19657
|
+
styleEffective: (_b = cEntity.styleEffective) !== null && _b !== void 0 ? _b : undefined
|
|
19416
19658
|
},
|
|
19417
19659
|
requestRender: false
|
|
19418
19660
|
});
|
|
@@ -19420,6 +19662,8 @@ var EntityRenderManager;
|
|
|
19420
19662
|
else if (updated.get(id) && rego) {
|
|
19421
19663
|
rego.visual = cEntity;
|
|
19422
19664
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
19665
|
+
rego.styleId = cEntity.styleId;
|
|
19666
|
+
rego.styleEffective = cEntity.styleEffective;
|
|
19423
19667
|
rego.name = cEntity.name;
|
|
19424
19668
|
// We manually trigger an update event since the graphic was updated but not recreated.
|
|
19425
19669
|
this.visualsManager.OnUpdate.Trigger({
|
|
@@ -20490,6 +20734,10 @@ class TilesetStyler {
|
|
|
20490
20734
|
// Once the style is loaded, we can queue the set for styling.
|
|
20491
20735
|
this.stylePendingEntityIds = new Map();
|
|
20492
20736
|
this.fallbackStyle = null;
|
|
20737
|
+
// Laid over whichever style each feature resolves, so it only changes the fields it sets.
|
|
20738
|
+
this.styleOverlay = null;
|
|
20739
|
+
// The tileset's blend before an overlay's colours replaced it, put back once no overlay colours it.
|
|
20740
|
+
this.blendBeforeOverlay = null;
|
|
20493
20741
|
this.styleFallbackLoaded = false;
|
|
20494
20742
|
this.loadingCounter = 0;
|
|
20495
20743
|
// Entity IDs -> boolean to indicate if we should override the feature colour.
|
|
@@ -20542,12 +20790,18 @@ class TilesetStyler {
|
|
|
20542
20790
|
return this._styleProgress;
|
|
20543
20791
|
}
|
|
20544
20792
|
Init(params) {
|
|
20545
|
-
var _a, _b;
|
|
20793
|
+
var _a, _b, _c;
|
|
20546
20794
|
let { viewer, api, cTileset, fallbackStyleId, styleMapping, expandSources, menuItemId, register, scenario, historic, applyStyles, monitor } = params;
|
|
20795
|
+
this.styleOverlay = (_a = params.styleOverlay) !== null && _a !== void 0 ? _a : null;
|
|
20547
20796
|
this.monitor = monitor;
|
|
20548
20797
|
this.viewer = viewer;
|
|
20549
20798
|
this.api = api;
|
|
20799
|
+
// A tileset handed in fresh still has its own blend, so nothing is left to put back on it.
|
|
20800
|
+
if (cTileset !== this.cTileset) {
|
|
20801
|
+
this.blendBeforeOverlay = null;
|
|
20802
|
+
}
|
|
20550
20803
|
this.cTileset = cTileset;
|
|
20804
|
+
this.applyOverlayBlend();
|
|
20551
20805
|
this.bakedAttributes = getBakedAttributes(cTileset);
|
|
20552
20806
|
this.register = register;
|
|
20553
20807
|
this.menuItemId = menuItemId;
|
|
@@ -20571,7 +20825,7 @@ class TilesetStyler {
|
|
|
20571
20825
|
// We have some evil hard-coded style mappings that need to be fixed.
|
|
20572
20826
|
// These exist within legacy project views.
|
|
20573
20827
|
// Update: This now also lets people have a style mapping without a real style record.
|
|
20574
|
-
if ((
|
|
20828
|
+
if ((_b = this.styleMapping) === null || _b === void 0 ? void 0 : _b.length) {
|
|
20575
20829
|
for (let i = 0; i < this.styleMapping.length; i++) {
|
|
20576
20830
|
const mapItem = this.styleMapping[i];
|
|
20577
20831
|
const mapStyle = mapItem.style ? mapItem.style : mapItem.Style;
|
|
@@ -20611,7 +20865,7 @@ class TilesetStyler {
|
|
|
20611
20865
|
});
|
|
20612
20866
|
this.loaded = true;
|
|
20613
20867
|
this.loadStyles();
|
|
20614
|
-
const feed = (
|
|
20868
|
+
const feed = (_c = this.api) === null || _c === void 0 ? void 0 : _c.RecordChangeFeed;
|
|
20615
20869
|
if (feed) {
|
|
20616
20870
|
this.feedSub = feed.Subscribe({
|
|
20617
20871
|
concepts: [AccountConcept.EConcept.ENTITY],
|
|
@@ -20676,6 +20930,11 @@ class TilesetStyler {
|
|
|
20676
20930
|
else {
|
|
20677
20931
|
this.fallbackStyle = null;
|
|
20678
20932
|
}
|
|
20933
|
+
// Left as it is when a caller omits it, so a mapping change keeps the scene-wide style.
|
|
20934
|
+
if (params.styleOverlay !== undefined) {
|
|
20935
|
+
this.styleOverlay = params.styleOverlay;
|
|
20936
|
+
this.applyOverlayBlend();
|
|
20937
|
+
}
|
|
20679
20938
|
if (params.scenario != null) {
|
|
20680
20939
|
if (!this.shouldUpdateRegoStates && !!this.scenario) {
|
|
20681
20940
|
this.shouldUpdateRegoStates = true;
|
|
@@ -20764,6 +21023,25 @@ class TilesetStyler {
|
|
|
20764
21023
|
}
|
|
20765
21024
|
this.queueTilesetFeatureStyle(regos, highPriority);
|
|
20766
21025
|
}
|
|
21026
|
+
/*
|
|
21027
|
+
* Replaces the tileset's own colours while an overlay sets a model fill, so features show exactly what it maps to.
|
|
21028
|
+
*/
|
|
21029
|
+
applyOverlayBlend() {
|
|
21030
|
+
var _a, _b, _c, _d;
|
|
21031
|
+
if (!this.cTileset || ((_b = (_a = this.cTileset).isDestroyed) === null || _b === void 0 ? void 0 : _b.call(_a))) {
|
|
21032
|
+
return;
|
|
21033
|
+
}
|
|
21034
|
+
const fill = (_d = (_c = this.styleOverlay) === null || _c === void 0 ? void 0 : _c.modelStyle) === null || _d === void 0 ? void 0 : _d.fillColor;
|
|
21035
|
+
const colours = Array.isArray(fill) ? fill.length > 0 : fill != null;
|
|
21036
|
+
if (colours && this.blendBeforeOverlay == null) {
|
|
21037
|
+
this.blendBeforeOverlay = this.cTileset.colorBlendMode;
|
|
21038
|
+
this.cTileset.colorBlendMode = Cesium3DTileColorBlendMode.REPLACE;
|
|
21039
|
+
}
|
|
21040
|
+
else if (!colours && this.blendBeforeOverlay != null) {
|
|
21041
|
+
this.cTileset.colorBlendMode = this.blendBeforeOverlay;
|
|
21042
|
+
this.blendBeforeOverlay = null;
|
|
21043
|
+
}
|
|
21044
|
+
}
|
|
20767
21045
|
/**
|
|
20768
21046
|
* Calculates the current progress % and updates the progress if there is a change.
|
|
20769
21047
|
*/
|
|
@@ -21178,12 +21456,11 @@ class TilesetStyler {
|
|
|
21178
21456
|
override: override
|
|
21179
21457
|
});
|
|
21180
21458
|
this.overrideFeatureColor.set(rego.entityId, true);
|
|
21181
|
-
|
|
21182
|
-
|
|
21183
|
-
}
|
|
21459
|
+
// Assigned outright, so a restyle that traces nothing clears the old key.
|
|
21460
|
+
rego.styleId = resolvedStyleId !== null && resolvedStyleId !== void 0 ? resolvedStyleId : undefined;
|
|
21184
21461
|
rego.styleEffective = (_b = StyleEffective.Combine([
|
|
21185
21462
|
{ key: "color", effective: fillColorTrace.effective }
|
|
21186
|
-
])) !== null && _b !== void 0 ? _b :
|
|
21463
|
+
])) !== null && _b !== void 0 ? _b : undefined;
|
|
21187
21464
|
}
|
|
21188
21465
|
if (((_c = data === null || data === void 0 ? void 0 : data.Bruce) === null || _c === void 0 ? void 0 : _c.InternalID) != null) {
|
|
21189
21466
|
rego.internalId = data.Bruce.InternalID;
|
|
@@ -21229,6 +21506,7 @@ class TilesetStyler {
|
|
|
21229
21506
|
style = (_b = this.fallbackStyle) === null || _b === void 0 ? void 0 : _b.Settings;
|
|
21230
21507
|
styleId = this.fallbackStyleId != null ? Number(this.fallbackStyleId) : null;
|
|
21231
21508
|
}
|
|
21509
|
+
style = MenuItemStyleOverlay.Merge(style, this.styleOverlay);
|
|
21232
21510
|
if (!style || !((_c = style === null || style === void 0 ? void 0 : style.modelStyle) === null || _c === void 0 ? void 0 : _c.customize)) {
|
|
21233
21511
|
return { settings: null, styleId: null };
|
|
21234
21512
|
}
|
|
@@ -22420,6 +22698,7 @@ var TilesetCadRenderManager;
|
|
|
22420
22698
|
api: this.getters.GetBruceApi(),
|
|
22421
22699
|
cTileset: this.cTileset,
|
|
22422
22700
|
fallbackStyleId: this.item.styleId,
|
|
22701
|
+
styleOverlay: MenuItemStyleOverlay.Get(this.item),
|
|
22423
22702
|
styleMapping: this.item.StyleMapping,
|
|
22424
22703
|
expandSources: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.ExpandSources,
|
|
22425
22704
|
menuItemId: this.item.id,
|
|
@@ -22634,6 +22913,7 @@ var TilesetCadRenderManager;
|
|
|
22634
22913
|
api: this.getters.GetBruceApi(),
|
|
22635
22914
|
cTileset: this.cTileset,
|
|
22636
22915
|
fallbackStyleId: this.item.styleId,
|
|
22916
|
+
styleOverlay: MenuItemStyleOverlay.Get(this.item),
|
|
22637
22917
|
styleMapping: this.item.StyleMapping,
|
|
22638
22918
|
expandSources: (_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.ExpandSources,
|
|
22639
22919
|
menuItemId: this.item.id,
|
|
@@ -23255,7 +23535,8 @@ var TilesetCadRenderManager;
|
|
|
23255
23535
|
// Before the tileset loads this only stores the pick, and the styler's Init reads the new item.
|
|
23256
23536
|
this.styler.UpdateStyleMapping({
|
|
23257
23537
|
styleMapping: (_a = item.StyleMapping) !== null && _a !== void 0 ? _a : [],
|
|
23258
|
-
fallbackStyleId: item.styleId
|
|
23538
|
+
fallbackStyleId: item.styleId,
|
|
23539
|
+
styleOverlay: MenuItemStyleOverlay.Get(item)
|
|
23259
23540
|
});
|
|
23260
23541
|
}
|
|
23261
23542
|
Dispose() {
|
|
@@ -24739,6 +25020,8 @@ var DataLabRenderManager;
|
|
|
24739
25020
|
this.isRunningCheck = false;
|
|
24740
25021
|
this.viewMonitorRemoval = null;
|
|
24741
25022
|
this.renderQueue = [];
|
|
25023
|
+
// Queued Entities a caller handed in, drawn even when the skip gate sees nothing changed.
|
|
25024
|
+
this.renderQueueForced = new Set();
|
|
24742
25025
|
this.renderQueueInterval = null;
|
|
24743
25026
|
this.zoomControl = [];
|
|
24744
25027
|
this.queryLoadId = 0;
|
|
@@ -24767,6 +25050,7 @@ var DataLabRenderManager;
|
|
|
24767
25050
|
clearInterval(this.renderQueueInterval);
|
|
24768
25051
|
this.renderQueueInterval = null;
|
|
24769
25052
|
this.renderQueue = [];
|
|
25053
|
+
this.renderQueueForced.clear();
|
|
24770
25054
|
this.renderedEntities = {};
|
|
24771
25055
|
this.ensureSettings();
|
|
24772
25056
|
this.visualsManager.RemoveRegos({
|
|
@@ -24929,6 +25213,7 @@ var DataLabRenderManager;
|
|
|
24929
25213
|
clearInterval(this.renderQueueInterval);
|
|
24930
25214
|
this.renderQueueInterval = null;
|
|
24931
25215
|
this.renderQueue = [];
|
|
25216
|
+
this.renderQueueForced.clear();
|
|
24932
25217
|
this.entityCheckQueueIds = [];
|
|
24933
25218
|
this.visualsManager.RemoveRegos({
|
|
24934
25219
|
menuItemId: this.item.id
|
|
@@ -24971,7 +25256,8 @@ var DataLabRenderManager;
|
|
|
24971
25256
|
await this.renderDataLabEntities(entities, true);
|
|
24972
25257
|
}
|
|
24973
25258
|
else {
|
|
24974
|
-
|
|
25259
|
+
// The skip gate cannot see an edited copy, so handed-in Entities are drawn forced.
|
|
25260
|
+
this.distributeForRender(entities, true);
|
|
24975
25261
|
}
|
|
24976
25262
|
}
|
|
24977
25263
|
else {
|
|
@@ -25094,15 +25380,28 @@ var DataLabRenderManager;
|
|
|
25094
25380
|
}
|
|
25095
25381
|
}
|
|
25096
25382
|
}
|
|
25097
|
-
distributeForRender(entities) {
|
|
25383
|
+
distributeForRender(entities, force = false) {
|
|
25098
25384
|
if (this.disposed || !(entities === null || entities === void 0 ? void 0 : entities.length)) {
|
|
25099
25385
|
return;
|
|
25100
25386
|
}
|
|
25387
|
+
if (force) {
|
|
25388
|
+
entities.forEach(x => this.renderQueueForced.add(x));
|
|
25389
|
+
}
|
|
25101
25390
|
this.renderQueue = this.renderQueue.concat(entities);
|
|
25102
25391
|
if (!this.renderQueueInterval && this.renderQueue.length) {
|
|
25103
25392
|
this.renderQueueInterval = setInterval(() => {
|
|
25104
|
-
const
|
|
25105
|
-
|
|
25393
|
+
const taken = this.renderQueue.splice(0, BATCH_SIZE$3);
|
|
25394
|
+
// Read before de-duplicating, so a copy it drops does not stay in the set.
|
|
25395
|
+
const takenForced = new Set(taken.filter(x => this.renderQueueForced.delete(x)));
|
|
25396
|
+
const batch = this.deduplicateEntities(taken);
|
|
25397
|
+
const forced = batch.filter(x => takenForced.has(x));
|
|
25398
|
+
const rest = batch.filter(x => !takenForced.has(x));
|
|
25399
|
+
if (forced.length) {
|
|
25400
|
+
this.renderDataLabEntities(forced, true);
|
|
25401
|
+
}
|
|
25402
|
+
if (rest.length) {
|
|
25403
|
+
this.renderDataLabEntities(rest);
|
|
25404
|
+
}
|
|
25106
25405
|
if (this.renderQueue.length <= 0) {
|
|
25107
25406
|
clearInterval(this.renderQueueInterval);
|
|
25108
25407
|
this.renderQueueInterval = null;
|
|
@@ -25134,7 +25433,7 @@ var DataLabRenderManager;
|
|
|
25134
25433
|
return next;
|
|
25135
25434
|
}
|
|
25136
25435
|
async doRenderDataLabEntities(entities, force = false) {
|
|
25137
|
-
var _a, _b, _c;
|
|
25436
|
+
var _a, _b, _c, _d, _e;
|
|
25138
25437
|
if (this.disposed || this.viewer.isDestroyed() || !(entities === null || entities === void 0 ? void 0 : entities.length)) {
|
|
25139
25438
|
return;
|
|
25140
25439
|
}
|
|
@@ -25183,7 +25482,9 @@ var DataLabRenderManager;
|
|
|
25183
25482
|
tagIds: entity.Bruce["Layer.ID"] ? [].concat(entity.Bruce["Layer.ID"]) : [],
|
|
25184
25483
|
name: cEntity.name,
|
|
25185
25484
|
cdn: this.item.cdnEnabled,
|
|
25186
|
-
outline: entity.Bruce.Outline
|
|
25485
|
+
outline: entity.Bruce.Outline,
|
|
25486
|
+
styleId: (_b = cEntity.styleId) !== null && _b !== void 0 ? _b : undefined,
|
|
25487
|
+
styleEffective: (_c = cEntity.styleEffective) !== null && _c !== void 0 ? _c : undefined
|
|
25187
25488
|
},
|
|
25188
25489
|
requestRender: false
|
|
25189
25490
|
});
|
|
@@ -25192,10 +25493,12 @@ var DataLabRenderManager;
|
|
|
25192
25493
|
rego.name = cEntity.name;
|
|
25193
25494
|
rego.visual = cEntity;
|
|
25194
25495
|
rego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
25496
|
+
rego.styleId = cEntity.styleId;
|
|
25497
|
+
rego.styleEffective = cEntity.styleEffective;
|
|
25195
25498
|
rego.tagIds = entity.Bruce["Layer.ID"] ? [].concat(entity.Bruce["Layer.ID"]) : [];
|
|
25196
|
-
rego.outline = (
|
|
25499
|
+
rego.outline = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.Outline;
|
|
25197
25500
|
rego.cdn = this.item.cdnEnabled;
|
|
25198
|
-
rego.schema = (
|
|
25501
|
+
rego.schema = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.Schema;
|
|
25199
25502
|
rego.canEdit = canEdit;
|
|
25200
25503
|
if (rego.stale) {
|
|
25201
25504
|
this.visualsManager.RefreshMark({
|
|
@@ -25271,6 +25574,7 @@ var DataLabRenderManager;
|
|
|
25271
25574
|
renderSignature: Manager.GetRenderSignature(this.item)
|
|
25272
25575
|
};
|
|
25273
25576
|
this.renderQueue = [];
|
|
25577
|
+
this.renderQueueForced.clear();
|
|
25274
25578
|
this.queryLoadId += 1;
|
|
25275
25579
|
this.disposed = true;
|
|
25276
25580
|
return payload;
|
|
@@ -26709,6 +27013,7 @@ var TilesetEntitiesRenderManager;
|
|
|
26709
27013
|
api: api,
|
|
26710
27014
|
cTileset: this.cTileset,
|
|
26711
27015
|
fallbackStyleId: this.item.styleId,
|
|
27016
|
+
styleOverlay: MenuItemStyleOverlay.Get(this.item),
|
|
26712
27017
|
styleMapping: [],
|
|
26713
27018
|
expandSources: false,
|
|
26714
27019
|
menuItemId: this.item.id,
|
|
@@ -26931,7 +27236,8 @@ var TilesetEntitiesRenderManager;
|
|
|
26931
27236
|
if (Manager.NeedsStyler(item)) {
|
|
26932
27237
|
this.styler.UpdateStyleMapping({
|
|
26933
27238
|
styleMapping: [],
|
|
26934
|
-
fallbackStyleId: item.styleId
|
|
27239
|
+
fallbackStyleId: item.styleId,
|
|
27240
|
+
styleOverlay: MenuItemStyleOverlay.Get(item)
|
|
26935
27241
|
});
|
|
26936
27242
|
}
|
|
26937
27243
|
}
|
|
@@ -27082,6 +27388,7 @@ var TilesetEntitiesRenderManager;
|
|
|
27082
27388
|
api: this.getters.GetBruceApi(),
|
|
27083
27389
|
cTileset: this.cTileset,
|
|
27084
27390
|
fallbackStyleId: this.item.styleId,
|
|
27391
|
+
styleOverlay: MenuItemStyleOverlay.Get(this.item),
|
|
27085
27392
|
styleMapping: [],
|
|
27086
27393
|
expandSources: false,
|
|
27087
27394
|
menuItemId: this.item.id,
|
|
@@ -28009,6 +28316,7 @@ var TilesetArbRenderManager;
|
|
|
28009
28316
|
api: api,
|
|
28010
28317
|
cTileset: this.cTileset,
|
|
28011
28318
|
fallbackStyleId: this.item.styleId,
|
|
28319
|
+
styleOverlay: MenuItemStyleOverlay.Get(this.item),
|
|
28012
28320
|
styleMapping: this.item.StyleMapping,
|
|
28013
28321
|
expandSources: false,
|
|
28014
28322
|
menuItemId: this.item.id,
|
|
@@ -28204,7 +28512,8 @@ var TilesetArbRenderManager;
|
|
|
28204
28512
|
if (this.item.ApplyStyles || this.item.Type == MenuItem.EType.IonTileset) {
|
|
28205
28513
|
this.styler.UpdateStyleMapping({
|
|
28206
28514
|
styleMapping: (_a = this.item.StyleMapping) !== null && _a !== void 0 ? _a : [],
|
|
28207
|
-
fallbackStyleId: this.item.styleId
|
|
28515
|
+
fallbackStyleId: this.item.styleId,
|
|
28516
|
+
styleOverlay: MenuItemStyleOverlay.Get(this.item)
|
|
28208
28517
|
});
|
|
28209
28518
|
}
|
|
28210
28519
|
}
|
|
@@ -31836,17 +32145,21 @@ var MenuItemStyles;
|
|
|
31836
32145
|
}
|
|
31837
32146
|
MenuItemStyles.Resolve = Resolve;
|
|
31838
32147
|
/**
|
|
31839
|
-
* Returns a copy on the style a bookmark alternation picked
|
|
32148
|
+
* Returns a copy on the style a bookmark alternation picked and carrying any style it laid on the item.
|
|
31840
32149
|
*/
|
|
31841
32150
|
function ApplyAlternation(item, alternation) {
|
|
31842
32151
|
var _a, _b, _c;
|
|
31843
32152
|
// Alternations are partial items and may carry no Type, so the pick is read from whichever field is present.
|
|
31844
32153
|
const alt = alternation;
|
|
31845
32154
|
const picked = (_a = alt === null || alt === void 0 ? void 0 : alt.styleId) !== null && _a !== void 0 ? _a : (_b = getVisibleRow(alt === null || alt === void 0 ? void 0 : alt.CameraZoomSettings)) === null || _b === void 0 ? void 0 : _b.StyleID;
|
|
31846
|
-
|
|
31847
|
-
|
|
32155
|
+
const next = picked == null ? item : ((_c = WithStyleId(item, picked)) !== null && _c !== void 0 ? _c : item);
|
|
32156
|
+
// A style laid by record need not be one of the item's own, unlike the pick.
|
|
32157
|
+
const itemStyle = alternation === null || alternation === void 0 ? void 0 : alternation.style;
|
|
32158
|
+
const laid = MenuItemStyleOverlay.GetItemStyle(alternation) || MenuItemStyleOverlay.GetItemStyleId(alternation);
|
|
32159
|
+
if (laid == null) {
|
|
32160
|
+
return next;
|
|
31848
32161
|
}
|
|
31849
|
-
return (
|
|
32162
|
+
return MenuItemStyleOverlay.WithItemStyle(next, itemStyle);
|
|
31850
32163
|
}
|
|
31851
32164
|
MenuItemStyles.ApplyAlternation = ApplyAlternation;
|
|
31852
32165
|
/**
|
|
@@ -32076,6 +32389,9 @@ var MenuItemManager;
|
|
|
32076
32389
|
get Viewer() {
|
|
32077
32390
|
return this.viewer;
|
|
32078
32391
|
}
|
|
32392
|
+
get StyleOverlay() {
|
|
32393
|
+
return this.styleOverlay;
|
|
32394
|
+
}
|
|
32079
32395
|
get VisualsRegister() {
|
|
32080
32396
|
return this.visualsRegister;
|
|
32081
32397
|
}
|
|
@@ -32136,6 +32452,12 @@ var MenuItemManager;
|
|
|
32136
32452
|
this.pendingHandoffPool = [];
|
|
32137
32453
|
// The settings bookmark alternations overwrite on a view's items, as that view authored them.
|
|
32138
32454
|
this.authoredAlternations = new WeakMap();
|
|
32455
|
+
// Laid over each item's own style where it can take one, including items rendered after it was set.
|
|
32456
|
+
this.styleOverlay = null;
|
|
32457
|
+
this.styleOverlayCounter = 0;
|
|
32458
|
+
// Style records bookmark styles name by ID, loaded once each; null for one that failed to load.
|
|
32459
|
+
this.itemStyleRecords = new Map();
|
|
32460
|
+
this.itemStyleRecordsLoading = new Set();
|
|
32139
32461
|
this.onUpdate = null;
|
|
32140
32462
|
// Segments discovered so far per menu item ID.
|
|
32141
32463
|
this.seriesSegments = new Map();
|
|
@@ -32217,12 +32539,18 @@ var MenuItemManager;
|
|
|
32217
32539
|
}
|
|
32218
32540
|
// An item with a style set renders its first style unless the caller already picked one of them.
|
|
32219
32541
|
params = { ...params, item: MenuItemStyles.Resolve(params.item) };
|
|
32542
|
+
// The overlay rides on the rendered copy, so the view's item never carries it.
|
|
32543
|
+
const effective = this.getEffectiveOverlay(params.item, this.styleOverlay);
|
|
32544
|
+
params = { ...params, item: MenuItemStyleOverlay.With(params.item, effective) };
|
|
32220
32545
|
let rItem = this.items.find(x => x.id == params.item.id);
|
|
32221
32546
|
let create = true;
|
|
32222
32547
|
// Item already exists so we'll check if we should re-create it.
|
|
32223
32548
|
if (rItem) {
|
|
32224
|
-
// Only the
|
|
32225
|
-
|
|
32549
|
+
// Only the style pick, overlay or bookmark style changed, so the graphics are restyled, not rebuilt.
|
|
32550
|
+
const stripped = MenuItemStyleOverlay.Strip(params.item);
|
|
32551
|
+
const pickOnly = MenuItemStyles.IsStyleChangeOnly(MenuItemStyleOverlay.Strip(rItem.item), stripped);
|
|
32552
|
+
const restyleOnly = pickOnly || MenuItemStyleOverlay.IsChangeOnly(rItem.item, params.item);
|
|
32553
|
+
if (restyleOnly && this.isStyleSwapCapable(rItem.renderManager)) {
|
|
32226
32554
|
rItem.renderManager.SwapStyle(params.item);
|
|
32227
32555
|
rItem.item = params.item;
|
|
32228
32556
|
create = false;
|
|
@@ -32669,6 +32997,120 @@ var MenuItemManager;
|
|
|
32669
32997
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({ isEnabling: true, itemId: rItem.id });
|
|
32670
32998
|
return true;
|
|
32671
32999
|
}
|
|
33000
|
+
/**
|
|
33001
|
+
* Lays a style, inline or by record, over every item that can take one; null clears it.
|
|
33002
|
+
*/
|
|
33003
|
+
async SetStyleOverlay(params) {
|
|
33004
|
+
var _a, _b, _c;
|
|
33005
|
+
const counter = ++this.styleOverlayCounter;
|
|
33006
|
+
let overlay = (_a = params === null || params === void 0 ? void 0 : params.style) !== null && _a !== void 0 ? _a : null;
|
|
33007
|
+
if (!overlay && (params === null || params === void 0 ? void 0 : params.styleId) != null && params.styleId !== "" && params.styleId != -1) {
|
|
33008
|
+
// A record that fails to load leaves every item on its own style.
|
|
33009
|
+
try {
|
|
33010
|
+
const { style } = await Style.Get({
|
|
33011
|
+
api: this.getters.GetBruceApi(),
|
|
33012
|
+
styleId: params.styleId
|
|
33013
|
+
});
|
|
33014
|
+
overlay = (_b = style === null || style === void 0 ? void 0 : style.Settings) !== null && _b !== void 0 ? _b : null;
|
|
33015
|
+
}
|
|
33016
|
+
catch (e) {
|
|
33017
|
+
console.error(e);
|
|
33018
|
+
}
|
|
33019
|
+
}
|
|
33020
|
+
// A later call won while the record loaded.
|
|
33021
|
+
if (counter !== this.styleOverlayCounter) {
|
|
33022
|
+
return;
|
|
33023
|
+
}
|
|
33024
|
+
this.styleOverlay = overlay;
|
|
33025
|
+
for (const rItem of this.items) {
|
|
33026
|
+
const next = MenuItemStyleOverlay.With(rItem.item, this.getEffectiveOverlay(rItem.item, overlay));
|
|
33027
|
+
// Setting the same overlay again would otherwise restyle every feature for nothing.
|
|
33028
|
+
const unchanged = JSON.stringify(MenuItemStyleOverlay.Get(next)) === JSON.stringify(MenuItemStyleOverlay.Get(rItem.item));
|
|
33029
|
+
if (unchanged ||
|
|
33030
|
+
!this.isStyleSwapCapable(rItem.renderManager) ||
|
|
33031
|
+
rItem.renderManager.Disposed) {
|
|
33032
|
+
continue;
|
|
33033
|
+
}
|
|
33034
|
+
rItem.renderManager.SwapStyle(next);
|
|
33035
|
+
rItem.item = next;
|
|
33036
|
+
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger({ isEnabling: true, itemId: rItem.id });
|
|
33037
|
+
}
|
|
33038
|
+
}
|
|
33039
|
+
/**
|
|
33040
|
+
* Lays an inline style or any Style record on one enabled item under the scene-wide one; neither clears it.
|
|
33041
|
+
*/
|
|
33042
|
+
SetItemStyleOverlay(params) {
|
|
33043
|
+
var _a;
|
|
33044
|
+
const rItem = this.items.find(x => x.id === params.menuItemId);
|
|
33045
|
+
let itemStyle = null;
|
|
33046
|
+
if (params.style) {
|
|
33047
|
+
itemStyle = { style: params.style };
|
|
33048
|
+
}
|
|
33049
|
+
else if (params.styleId != null) {
|
|
33050
|
+
itemStyle = { styleId: params.styleId };
|
|
33051
|
+
}
|
|
33052
|
+
if (!rItem ||
|
|
33053
|
+
!this.isStyleSwapCapable(rItem.renderManager) ||
|
|
33054
|
+
rItem.renderManager.Disposed ||
|
|
33055
|
+
(itemStyle && !MenuItemStyleOverlay.Supports(rItem.item))) {
|
|
33056
|
+
return false;
|
|
33057
|
+
}
|
|
33058
|
+
const styled = MenuItemStyleOverlay.WithItemStyle(rItem.item, itemStyle);
|
|
33059
|
+
const next = MenuItemStyleOverlay.With(styled, this.getEffectiveOverlay(styled, this.styleOverlay));
|
|
33060
|
+
rItem.renderManager.SwapStyle(next);
|
|
33061
|
+
rItem.item = next;
|
|
33062
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({ isEnabling: true, itemId: rItem.id });
|
|
33063
|
+
return true;
|
|
33064
|
+
}
|
|
33065
|
+
/*
|
|
33066
|
+
* Returns the overlay the item renders with, starting the load of a record it names that is not loaded yet.
|
|
33067
|
+
*/
|
|
33068
|
+
getEffectiveOverlay(item, overlay) {
|
|
33069
|
+
const styleId = MenuItemStyleOverlay.GetItemStyle(item) ? null : MenuItemStyleOverlay.GetItemStyleId(item);
|
|
33070
|
+
if (styleId != null && !this.itemStyleRecords.has(String(styleId))) {
|
|
33071
|
+
this.loadItemStyleRecord(styleId);
|
|
33072
|
+
}
|
|
33073
|
+
const record = styleId != null ? this.itemStyleRecords.get(String(styleId)) : null;
|
|
33074
|
+
return MenuItemStyleOverlay.Effective(item, overlay, record !== null && record !== void 0 ? record : undefined);
|
|
33075
|
+
}
|
|
33076
|
+
/*
|
|
33077
|
+
* Loads a record a bookmark style names, then restyles every enabled item that names it.
|
|
33078
|
+
*/
|
|
33079
|
+
async loadItemStyleRecord(styleId) {
|
|
33080
|
+
var _a, _b;
|
|
33081
|
+
const key = String(styleId);
|
|
33082
|
+
if (this.itemStyleRecordsLoading.has(key)) {
|
|
33083
|
+
return;
|
|
33084
|
+
}
|
|
33085
|
+
this.itemStyleRecordsLoading.add(key);
|
|
33086
|
+
let settings = null;
|
|
33087
|
+
// A record that fails to load leaves the item on its own style.
|
|
33088
|
+
try {
|
|
33089
|
+
const { style } = await Style.Get({
|
|
33090
|
+
api: this.getters.GetBruceApi(),
|
|
33091
|
+
styleId
|
|
33092
|
+
});
|
|
33093
|
+
settings = (_a = style === null || style === void 0 ? void 0 : style.Settings) !== null && _a !== void 0 ? _a : null;
|
|
33094
|
+
}
|
|
33095
|
+
catch (e) {
|
|
33096
|
+
console.error(e);
|
|
33097
|
+
}
|
|
33098
|
+
this.itemStyleRecordsLoading.delete(key);
|
|
33099
|
+
this.itemStyleRecords.set(key, settings);
|
|
33100
|
+
for (const rItem of this.items) {
|
|
33101
|
+
if (String(MenuItemStyleOverlay.GetItemStyleId(rItem.item)) !== key ||
|
|
33102
|
+
MenuItemStyleOverlay.GetItemStyle(rItem.item) ||
|
|
33103
|
+
!this.isStyleSwapCapable(rItem.renderManager) ||
|
|
33104
|
+
rItem.renderManager.Disposed) {
|
|
33105
|
+
continue;
|
|
33106
|
+
}
|
|
33107
|
+
const effective = this.getEffectiveOverlay(rItem.item, this.styleOverlay);
|
|
33108
|
+
const next = MenuItemStyleOverlay.With(rItem.item, effective);
|
|
33109
|
+
rItem.renderManager.SwapStyle(next);
|
|
33110
|
+
rItem.item = next;
|
|
33111
|
+
(_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger({ isEnabling: true, itemId: rItem.id });
|
|
33112
|
+
}
|
|
33113
|
+
}
|
|
32672
33114
|
/*
|
|
32673
33115
|
* Picks the child the caller asked for, else the one already enabled, else the first.
|
|
32674
33116
|
*/
|
|
@@ -46598,15 +47040,16 @@ var RenderManager;
|
|
|
46598
47040
|
*/
|
|
46599
47041
|
function GetZoomControlSignature(zoomControl) {
|
|
46600
47042
|
return JSON.stringify([].concat(zoomControl !== null && zoomControl !== void 0 ? zoomControl : []).map((zoomItem) => {
|
|
46601
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
47043
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
46602
47044
|
return ({
|
|
46603
47045
|
MinZoom: (_a = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.MinZoom) !== null && _a !== void 0 ? _a : null,
|
|
46604
47046
|
MaxZoom: (_b = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.MaxZoom) !== null && _b !== void 0 ? _b : null,
|
|
46605
47047
|
DisplayType: (_c = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.DisplayType) !== null && _c !== void 0 ? _c : null,
|
|
46606
47048
|
StyleID: (_d = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.StyleID) !== null && _d !== void 0 ? _d : null,
|
|
46607
47049
|
Style: (_e = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.Style) !== null && _e !== void 0 ? _e : null,
|
|
46608
|
-
|
|
46609
|
-
|
|
47050
|
+
StyleOverlay: (_f = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.StyleOverlay) !== null && _f !== void 0 ? _f : null,
|
|
47051
|
+
LODCategoryID: (_g = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.LODCategoryID) !== null && _g !== void 0 ? _g : null,
|
|
47052
|
+
LODLevel: (_h = zoomItem === null || zoomItem === void 0 ? void 0 : zoomItem.LODLevel) !== null && _h !== void 0 ? _h : null
|
|
46610
47053
|
});
|
|
46611
47054
|
}));
|
|
46612
47055
|
}
|
|
@@ -47876,7 +48319,8 @@ var EntityRenderEnginePoint;
|
|
|
47876
48319
|
for (let i = 0; i < params.entities.length; i++) {
|
|
47877
48320
|
const entity = params.entities[i];
|
|
47878
48321
|
const zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
47879
|
-
const
|
|
48322
|
+
const ownStyle = (!params.offline && zoomItem.StyleID != -1) ? (_a = (await getStyle$1(api, entity, zoomItem.StyleID))) === null || _a === void 0 ? void 0 : _a.Settings : zoomItem.Style;
|
|
48323
|
+
const style = MenuItemStyleOverlay.ApplyRow(ownStyle, zoomItem);
|
|
47880
48324
|
// Pass through tags that may be needed for styling.
|
|
47881
48325
|
const tagIds = entity.Bruce["Layer.ID"];
|
|
47882
48326
|
const tags = [];
|
|
@@ -48709,6 +49153,10 @@ var EntityRenderEngineModel3d;
|
|
|
48709
49153
|
trackEntity._parentEntity = cEntity;
|
|
48710
49154
|
}
|
|
48711
49155
|
cEntity._siblingGraphics = siblings;
|
|
49156
|
+
cEntity.styleEffective = StyleEffective.Combine([
|
|
49157
|
+
{ key: "color", effective: fillColorTrace.effective },
|
|
49158
|
+
{ key: "scale", effective: scaleTrace.effective }
|
|
49159
|
+
]);
|
|
48712
49160
|
return cEntity;
|
|
48713
49161
|
}
|
|
48714
49162
|
EntityRenderEngineModel3d.Render = Render;
|
|
@@ -48719,7 +49167,7 @@ var EntityRenderEngineModel3d;
|
|
|
48719
49167
|
* @returns
|
|
48720
49168
|
*/
|
|
48721
49169
|
async function RenderGroup(params) {
|
|
48722
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
49170
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
48723
49171
|
const api = params.apiGetter.getApi();
|
|
48724
49172
|
await api.Loading;
|
|
48725
49173
|
const cEntities = new Map();
|
|
@@ -48756,7 +49204,8 @@ var EntityRenderEngineModel3d;
|
|
|
48756
49204
|
for (let i = 0; i < params.entities.length; i++) {
|
|
48757
49205
|
const entity = params.entities[i];
|
|
48758
49206
|
const zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
48759
|
-
const
|
|
49207
|
+
const ownStyle = (!params.offline && zoomItem.StyleID != -1) ? (_a = (await getStyle$2(api, entity, zoomItem.StyleID))) === null || _a === void 0 ? void 0 : _a.Settings : zoomItem.Style;
|
|
49208
|
+
const style = MenuItemStyleOverlay.ApplyRow(ownStyle, zoomItem);
|
|
48760
49209
|
// Pass through tags that may be needed for styling.
|
|
48761
49210
|
const tagIds = entity.Bruce["Layer.ID"];
|
|
48762
49211
|
const tags = [];
|
|
@@ -48795,8 +49244,8 @@ var EntityRenderEngineModel3d;
|
|
|
48795
49244
|
for (let i = 0; i < params.entities.length; i++) {
|
|
48796
49245
|
const entity = params.entities[i];
|
|
48797
49246
|
const zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
48798
|
-
const
|
|
48799
|
-
const style = (
|
|
49247
|
+
const ownStyle = (!params.offline && zoomItem.StyleID != -1) ? (_c = (await getStyle$2(api, entity, zoomItem.StyleID))) === null || _c === void 0 ? void 0 : _c.Settings : zoomItem.Style;
|
|
49248
|
+
const style = MenuItemStyleOverlay.ApplyRow(ownStyle, zoomItem);
|
|
48800
49249
|
const lod = lodData.find(x => x.entityId == entity.Bruce.ID);
|
|
48801
49250
|
if (!(lod === null || lod === void 0 ? void 0 : lod.clientFileId)) {
|
|
48802
49251
|
continue;
|
|
@@ -48815,21 +49264,21 @@ var EntityRenderEngineModel3d;
|
|
|
48815
49264
|
let rego = null;
|
|
48816
49265
|
// Only used for historic tracks right now.
|
|
48817
49266
|
// So won't bother getting it if we don't have historic data.
|
|
48818
|
-
if ((
|
|
49267
|
+
if ((_d = params.entitiesHistoric) === null || _d === void 0 ? void 0 : _d[entity.Bruce.ID]) {
|
|
48819
49268
|
rego = params.visualRegister.GetRego({
|
|
48820
49269
|
entityId: entity.Bruce.ID,
|
|
48821
49270
|
menuItemId: params.menuItemId
|
|
48822
49271
|
});
|
|
48823
49272
|
}
|
|
48824
|
-
const mStyle = (
|
|
49273
|
+
const mStyle = (_e = style === null || style === void 0 ? void 0 : style.modelStyle) !== null && _e !== void 0 ? _e : {};
|
|
48825
49274
|
const cEntity = Render({
|
|
48826
|
-
rendered: (
|
|
49275
|
+
rendered: (_f = params.rendered) === null || _f === void 0 ? void 0 : _f.get(entity.Bruce.ID),
|
|
48827
49276
|
entity: entity,
|
|
48828
|
-
entityHistoric: (
|
|
49277
|
+
entityHistoric: (_g = params.entitiesHistoric) === null || _g === void 0 ? void 0 : _g[entity.Bruce.ID],
|
|
48829
49278
|
style: mStyle,
|
|
48830
49279
|
tags: tags,
|
|
48831
49280
|
viewer: params.viewer,
|
|
48832
|
-
lodUrl: (
|
|
49281
|
+
lodUrl: (_h = lod.url) !== null && _h !== void 0 ? _h : ClientFile.GetUrl({
|
|
48833
49282
|
api,
|
|
48834
49283
|
fileId: lod.clientFileId,
|
|
48835
49284
|
viaCdn: true
|
|
@@ -48845,7 +49294,8 @@ var EntityRenderEngineModel3d;
|
|
|
48845
49294
|
const name = await getName$1(api, entity, params.offline);
|
|
48846
49295
|
cEntity.name = name;
|
|
48847
49296
|
cEntity._renderGroup = EntityRenderEngine.GetRenderGroupId(zoomItem);
|
|
48848
|
-
|
|
49297
|
+
// The skip gate compares this with the zoom item, so it must not name the type default.
|
|
49298
|
+
cEntity.styleId = zoomItem.StyleID == -1 ? -1 : (+zoomItem.StyleID || null);
|
|
48849
49299
|
cEntities.set(entity.Bruce.ID, cEntity);
|
|
48850
49300
|
}
|
|
48851
49301
|
}
|
|
@@ -49284,7 +49734,8 @@ var EntityRenderEnginePolyline;
|
|
|
49284
49734
|
for (let i = 0; i < params.entities.length; i++) {
|
|
49285
49735
|
const entity = params.entities[i];
|
|
49286
49736
|
const zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
49287
|
-
const
|
|
49737
|
+
const ownStyle = (!params.offline && zoomItem.StyleID != -1) ? (_a = (await getStyle$3(api, entity, zoomItem.StyleID))) === null || _a === void 0 ? void 0 : _a.Settings : zoomItem.Style;
|
|
49738
|
+
const style = MenuItemStyleOverlay.ApplyRow(ownStyle, zoomItem);
|
|
49288
49739
|
// Pass through tags that may be needed for styling.
|
|
49289
49740
|
const tagIds = entity.Bruce["Layer.ID"];
|
|
49290
49741
|
const tags = [];
|
|
@@ -53962,7 +54413,8 @@ var EntityRenderEnginePolygon;
|
|
|
53962
54413
|
for (let i = 0; i < params.entities.length; i++) {
|
|
53963
54414
|
const entity = params.entities[i];
|
|
53964
54415
|
const zoomItem = params.zoomItems[entity.Bruce.ID];
|
|
53965
|
-
const
|
|
54416
|
+
const ownStyle = (!params.offline && zoomItem.StyleID != -1) ? (_a = (await getStyle$4(api, entity, zoomItem.StyleID))) === null || _a === void 0 ? void 0 : _a.Settings : zoomItem.Style;
|
|
54417
|
+
const style = MenuItemStyleOverlay.ApplyRow(ownStyle, zoomItem);
|
|
53966
54418
|
// Pass through tags that may be needed for styling.
|
|
53967
54419
|
const tagIds = entity.Bruce["Layer.ID"];
|
|
53968
54420
|
const tags = [];
|
|
@@ -56233,7 +56685,7 @@ var StyleUtils;
|
|
|
56233
56685
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
56234
56686
|
})(StyleUtils || (StyleUtils = {}));
|
|
56235
56687
|
|
|
56236
|
-
const VERSION = "7.6.
|
|
56688
|
+
const VERSION = "7.6.8";
|
|
56237
56689
|
/**
|
|
56238
56690
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
56239
56691
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|
|
@@ -56250,5 +56702,5 @@ const getENVIRONMENT = () => {
|
|
|
56250
56702
|
return ENVIRONMENT;
|
|
56251
56703
|
};
|
|
56252
56704
|
|
|
56253
|
-
export { VERSION, setENVIRONMENT, getENVIRONMENT, ClusterItems, PointClustering, PointClusterSize, CesiumAnimatedInOut, DisplacedSurfacePrimitive, CesiumAnimatedProperty, isStyleChanged, isOutlineChanged$1 as isOutlineChanged, StyleEffective, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, extractMetadataFromFileUrl, EntityRenderEnginePolygon, EntityRenderEnginePolyline, TextureFrameSeriesAnimator, TextureValueLabels, MenuItemCreator, MenuItemManager, MenuItemStyles, CesiumParabola, EntityLabel, EntityLabelGroup, LiveCursor, SharedGetters, EntitySimulation, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, createTileset, TilesetRenderEngine, ViewRenderEngine, VisualRegisterCuller, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, DEFAULT_BRIGHTNESS_SHIFT, DEFAULT_LIGHT_INTENSITY, LIGHTING_SETTINGS_VERSION, LIGHT_INTENSITY_COMPENSATION, MAX_COMPENSATED_LIGHT_INTENSITY, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, WidgetLeftPanelTabDashboard, EMenuItemState, WidgetLeftPanelTabMenuItems, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, ECursor, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, CreateTabIconSvg, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
|
|
56705
|
+
export { VERSION, setENVIRONMENT, getENVIRONMENT, ClusterItems, PointClustering, PointClusterSize, CesiumAnimatedInOut, DisplacedSurfacePrimitive, CesiumAnimatedProperty, isStyleChanged, isOutlineChanged$1 as isOutlineChanged, StyleEffective, EntityRenderEngine, EntityRenderEngineModel3d, EntityRenderEnginePoint, extractMetadataFromFileUrl, EntityRenderEnginePolygon, EntityRenderEnginePolyline, TextureFrameSeriesAnimator, TextureValueLabels, MenuItemCreator, MenuItemManager, MenuItemStyles, MenuItemStyleOverlay, CesiumParabola, EntityLabel, EntityLabelGroup, LiveCursor, SharedGetters, EntitySimulation, DataSourceStaticKmlManager, DataLabRenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, AssemblyRenderManager, GoogleSearchRenderManager, RelationsRenderManager, RenderManager, TilesetArbRenderManager, TilesetCadRenderManager, TilesetEntitiesRenderManager, TilesetGooglePhotosRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TileRenderEngine, createTileset, TilesetRenderEngine, ViewRenderEngine, VisualRegisterCuller, VisualsRegister, XGridsRenderEngine, CesiumEntityStyler, DrawingUtils, EntityUtils, MeasureUtils, StyleUtils, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, CESIUM_TIMELINE_LIVE_KEY, CESIUM_TIMELINE_LIVE_PADDING_KEY, CESIUM_TIMELINE_INTERVAL_KEY, CESIUM_MODEL_SPACE_KEY, DEFAULT_LIVE_PADDING_SECONDS, DEFAULT_BRIGHTNESS_SHIFT, DEFAULT_LIGHT_INTENSITY, LIGHTING_SETTINGS_VERSION, LIGHT_INTENSITY_COMPENSATION, MAX_COMPENSATED_LIGHT_INTENSITY, ViewUtils, CesiumViewMonitor, ViewGroundArea, ViewerEventTracker, ViewerUtils, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Walkthrough, WidgetControlViewBar, WidgetControlViewBarSearch, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks, WidgetLeftPanelTabDashboard, EMenuItemState, WidgetLeftPanelTabMenuItems, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, ECursor, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, CreateTabIconSvg, WidgetLeftPanel, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar };
|
|
56254
56706
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|