bruce-cesium 4.8.7 → 4.8.9
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 +188 -111
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +186 -109
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/visuals-register.js +196 -106
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/visuals-register.d.ts +10 -1
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile,
|
|
1
|
+
import { BruceEvent, Cartes, Entity as Entity$1, Carto, Geometry, MathUtils, LRUCache, Api, Calculator, ClientFile, EntityTag, EntityType, ObjectUtils, Style, ProjectViewTile, DelayQueue, EntityLod, Bounds, ZoomControl, EntityRelationType, ENVIRONMENT, EntityHistoricData, Tileset, EntityCoords, DataLab, EntitySource, MenuItem, EntityRelation, ProgramKey, ProjectView, ProjectViewBookmark, Camera, ProjectViewLegacyTile, EntityAttribute, EntityAttachment, EntityAttachmentType, AbstractApi, Session } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty,
|
|
3
|
+
import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, Entity, DistanceDisplayCondition, ClassificationType, ArcType, CornerType, ShadowMode, ConstantProperty, ConstantPositionProperty, ColorBlendMode, HeadingPitchRoll, Transforms, Model, HorizontalOrigin, VerticalOrigin, PolygonHierarchy, PolylineGraphics, ColorMaterialProperty, SceneMode, GeoJsonDataSource, Primitive, Cesium3DTileFeature, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, Ion, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, NearFarScalar, EllipsoidTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, UrlTemplateImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, Cesium3DTileset, Matrix4, Matrix3, IonResource, CesiumInspector, defined, ClockRange, PolygonPipeline, EllipsoidGeodesic, sampleTerrainMostDetailed, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, PolylineDashMaterialProperty, ScreenSpaceEventHandler, ScreenSpaceEventType, Quaternion, CzmlDataSource, Intersect, Fullscreen } from 'cesium';
|
|
4
4
|
|
|
5
5
|
/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -10322,11 +10322,18 @@ var VisualsRegister;
|
|
|
10322
10322
|
var Register = /** @class */ (function () {
|
|
10323
10323
|
function Register(params) {
|
|
10324
10324
|
this.id = ObjectUtils.UId();
|
|
10325
|
+
this.disposed = false;
|
|
10325
10326
|
this.rego = {};
|
|
10326
10327
|
this.onUpdate = null;
|
|
10327
10328
|
// Entity ID + Menu Item ID -> State.
|
|
10328
10329
|
// If an Entity ID state is set without a Menu Item ID, then it acts as a default for all Menu Items.
|
|
10329
10330
|
this.states = {};
|
|
10331
|
+
// Queue of Entity updates to process in batches to avoid overloading the render loop.
|
|
10332
|
+
this.updateQueue = [];
|
|
10333
|
+
// Settings related to those Entities in the queue.
|
|
10334
|
+
// This lets us modify the update without re-adding the item to the queue if it's already in it.
|
|
10335
|
+
this.updateQueueSettings = {};
|
|
10336
|
+
this.updateQueueInterval = null;
|
|
10330
10337
|
this.viewer = params.viewer;
|
|
10331
10338
|
this.apiGetters = params.apiGetters;
|
|
10332
10339
|
this.cameraCullerDispose = VisualRegisterCuller.Monitor({
|
|
@@ -10340,6 +10347,13 @@ var VisualsRegister;
|
|
|
10340
10347
|
enumerable: false,
|
|
10341
10348
|
configurable: true
|
|
10342
10349
|
});
|
|
10350
|
+
Object.defineProperty(Register.prototype, "Disposed", {
|
|
10351
|
+
get: function () {
|
|
10352
|
+
return this.disposed;
|
|
10353
|
+
},
|
|
10354
|
+
enumerable: false,
|
|
10355
|
+
configurable: true
|
|
10356
|
+
});
|
|
10343
10357
|
Object.defineProperty(Register.prototype, "Viewer", {
|
|
10344
10358
|
get: function () {
|
|
10345
10359
|
return this.viewer;
|
|
@@ -10364,6 +10378,76 @@ var VisualsRegister;
|
|
|
10364
10378
|
enumerable: false,
|
|
10365
10379
|
configurable: true
|
|
10366
10380
|
});
|
|
10381
|
+
Register.prototype.queueUpdate = function (update) {
|
|
10382
|
+
if (this.Disposed) {
|
|
10383
|
+
return;
|
|
10384
|
+
}
|
|
10385
|
+
// Merge settings from existing queued item.
|
|
10386
|
+
var settings = this.updateQueueSettings[update.entityId];
|
|
10387
|
+
if (settings !== true) {
|
|
10388
|
+
if (update.refresh === true) {
|
|
10389
|
+
settings = true;
|
|
10390
|
+
}
|
|
10391
|
+
else if (update.refresh === false) {
|
|
10392
|
+
if (!settings) {
|
|
10393
|
+
settings = false;
|
|
10394
|
+
}
|
|
10395
|
+
}
|
|
10396
|
+
else {
|
|
10397
|
+
if (!settings) {
|
|
10398
|
+
settings = {};
|
|
10399
|
+
}
|
|
10400
|
+
if (update.refresh.highlighted) {
|
|
10401
|
+
settings.highlighted = true;
|
|
10402
|
+
}
|
|
10403
|
+
if (update.refresh.selected) {
|
|
10404
|
+
settings.selected = true;
|
|
10405
|
+
}
|
|
10406
|
+
if (update.refresh.opacity) {
|
|
10407
|
+
settings.opacity = true;
|
|
10408
|
+
}
|
|
10409
|
+
}
|
|
10410
|
+
}
|
|
10411
|
+
this.updateQueueSettings[update.entityId] = settings;
|
|
10412
|
+
// Queue ID if it's not already in the queue.
|
|
10413
|
+
if (!this.updateQueue.includes(update.entityId)) {
|
|
10414
|
+
this.updateQueue.push(update.entityId);
|
|
10415
|
+
this.pingUpdateQueue();
|
|
10416
|
+
}
|
|
10417
|
+
};
|
|
10418
|
+
Register.prototype.pingUpdateQueue = function () {
|
|
10419
|
+
var _this = this;
|
|
10420
|
+
if (this.updateQueueInterval) {
|
|
10421
|
+
return;
|
|
10422
|
+
}
|
|
10423
|
+
var BATCH_SIZE = 300;
|
|
10424
|
+
if (this.updateQueue.length) {
|
|
10425
|
+
this.updateQueueInterval = setInterval(function () {
|
|
10426
|
+
if (_this.Disposed || (!_this.viewer || !_this.viewer.scene || _this.viewer.isDestroyed())) {
|
|
10427
|
+
clearInterval(_this.updateQueueInterval);
|
|
10428
|
+
_this.updateQueueInterval = null;
|
|
10429
|
+
return;
|
|
10430
|
+
}
|
|
10431
|
+
var batch = _this.updateQueue.splice(0, BATCH_SIZE);
|
|
10432
|
+
var cache = {};
|
|
10433
|
+
for (var i = 0; i < batch.length; i++) {
|
|
10434
|
+
var entityId = batch[i];
|
|
10435
|
+
// Check if still registered.
|
|
10436
|
+
if (!_this.rego[entityId] || !_this.rego[entityId].length) {
|
|
10437
|
+
continue;
|
|
10438
|
+
}
|
|
10439
|
+
updateEntity(_this.viewer, entityId, _this, _this.updateQueueSettings[entityId] == null ? false : _this.updateQueueSettings[entityId], cache);
|
|
10440
|
+
_this.updateQueueSettings[entityId] = null;
|
|
10441
|
+
delete _this.updateQueueSettings[entityId];
|
|
10442
|
+
}
|
|
10443
|
+
_this.viewer.scene.requestRender();
|
|
10444
|
+
if (!_this.updateQueue.length) {
|
|
10445
|
+
clearInterval(_this.updateQueueInterval);
|
|
10446
|
+
_this.updateQueueInterval = null;
|
|
10447
|
+
}
|
|
10448
|
+
}, 10);
|
|
10449
|
+
}
|
|
10450
|
+
};
|
|
10367
10451
|
/**
|
|
10368
10452
|
* Returns the applied visual state for a given Entity ID.
|
|
10369
10453
|
* This is a combination of a Menu Item specific state and a general state.
|
|
@@ -10428,13 +10512,10 @@ var VisualsRegister;
|
|
|
10428
10512
|
});
|
|
10429
10513
|
}
|
|
10430
10514
|
else {
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10515
|
+
this.queueUpdate({
|
|
10516
|
+
entityId: state.entityId,
|
|
10517
|
+
refresh: refresh
|
|
10434
10518
|
});
|
|
10435
|
-
for (var i = 0; i < regos.length; i++) {
|
|
10436
|
-
updateEntity(this.viewer, state.entityId, this, refresh, cache);
|
|
10437
|
-
}
|
|
10438
10519
|
}
|
|
10439
10520
|
// Trigger update event.
|
|
10440
10521
|
if (this.onUpdate) {
|
|
@@ -10503,15 +10584,16 @@ var VisualsRegister;
|
|
|
10503
10584
|
if (changed) {
|
|
10504
10585
|
if (updateAll) {
|
|
10505
10586
|
this.updateAllEntities({
|
|
10506
|
-
refresh: refresh
|
|
10587
|
+
refresh: __assign({}, refresh)
|
|
10507
10588
|
});
|
|
10508
10589
|
}
|
|
10509
10590
|
else {
|
|
10510
|
-
var cache = {};
|
|
10511
10591
|
for (var i = 0; i < entityIds.length; i++) {
|
|
10512
|
-
|
|
10592
|
+
this.queueUpdate({
|
|
10593
|
+
entityId: entityIds[i],
|
|
10594
|
+
refresh: __assign({}, refresh)
|
|
10595
|
+
});
|
|
10513
10596
|
}
|
|
10514
|
-
this.viewer.scene.requestRender();
|
|
10515
10597
|
}
|
|
10516
10598
|
// Trigger update event.
|
|
10517
10599
|
if (this.onUpdate) {
|
|
@@ -10603,8 +10685,41 @@ var VisualsRegister;
|
|
|
10603
10685
|
* Returns all visual state settings.
|
|
10604
10686
|
* This is typically used for saving.
|
|
10605
10687
|
*/
|
|
10606
|
-
Register.prototype.GetStates = function () {
|
|
10607
|
-
|
|
10688
|
+
Register.prototype.GetStates = function (params) {
|
|
10689
|
+
if (!(params === null || params === void 0 ? void 0 : params.optimized)) {
|
|
10690
|
+
return this.states;
|
|
10691
|
+
}
|
|
10692
|
+
var newStates = {};
|
|
10693
|
+
var keys = Object.keys(this.states);
|
|
10694
|
+
for (var i = 0; i < keys.length; i++) {
|
|
10695
|
+
var key = keys[i];
|
|
10696
|
+
var state = this.states[key];
|
|
10697
|
+
// Dereference.
|
|
10698
|
+
state = __assign({}, state);
|
|
10699
|
+
if (state.opacity === 1) {
|
|
10700
|
+
delete state.opacity;
|
|
10701
|
+
}
|
|
10702
|
+
if (state.hidden === false) {
|
|
10703
|
+
delete state.hidden;
|
|
10704
|
+
}
|
|
10705
|
+
if (state.highlighted === false) {
|
|
10706
|
+
delete state.highlighted;
|
|
10707
|
+
}
|
|
10708
|
+
if (state.selected === false) {
|
|
10709
|
+
delete state.selected;
|
|
10710
|
+
}
|
|
10711
|
+
if (state.labelled === false) {
|
|
10712
|
+
delete state.labelled;
|
|
10713
|
+
}
|
|
10714
|
+
if (state.isolated === false) {
|
|
10715
|
+
delete state.isolated;
|
|
10716
|
+
}
|
|
10717
|
+
if (isBlankState(state)) {
|
|
10718
|
+
continue;
|
|
10719
|
+
}
|
|
10720
|
+
newStates[key] = state;
|
|
10721
|
+
}
|
|
10722
|
+
return newStates;
|
|
10608
10723
|
};
|
|
10609
10724
|
/**
|
|
10610
10725
|
* Applies a set of new states to override the existing ones.
|
|
@@ -10710,22 +10825,24 @@ var VisualsRegister;
|
|
|
10710
10825
|
uncull: false
|
|
10711
10826
|
});
|
|
10712
10827
|
this.cameraCullerDispose = null;
|
|
10828
|
+
clearInterval(this.updateQueueInterval);
|
|
10829
|
+
this.updateQueueInterval = null;
|
|
10830
|
+
this.disposed = true;
|
|
10713
10831
|
};
|
|
10714
10832
|
Register.prototype.ForceUpdate = function (params) {
|
|
10715
10833
|
var _a;
|
|
10716
10834
|
var entityIds = params.entityIds, requestRender = params.requestRender, refreshColors = params.refreshColors;
|
|
10717
|
-
var cache = {};
|
|
10718
10835
|
for (var i = 0; i < entityIds.length; i++) {
|
|
10719
10836
|
var entityId = entityIds[i];
|
|
10720
|
-
|
|
10837
|
+
this.queueUpdate({
|
|
10838
|
+
entityId: entityId,
|
|
10839
|
+
refresh: true
|
|
10840
|
+
});
|
|
10721
10841
|
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({
|
|
10722
10842
|
type: EVisualUpdateType.Update,
|
|
10723
10843
|
entityId: entityId
|
|
10724
10844
|
});
|
|
10725
10845
|
}
|
|
10726
|
-
if (requestRender != false) {
|
|
10727
|
-
this.viewer.scene.requestRender();
|
|
10728
|
-
}
|
|
10729
10846
|
};
|
|
10730
10847
|
/**
|
|
10731
10848
|
* Marks given entityIds as either labelled or not labelled.
|
|
@@ -10734,7 +10851,6 @@ var VisualsRegister;
|
|
|
10734
10851
|
*/
|
|
10735
10852
|
Register.prototype.SetLabelled = function (params) {
|
|
10736
10853
|
var labelled = params.labelled, entityIds = params.entityIds, requestRender = params.requestRender, menuItemId = params.menuItemId;
|
|
10737
|
-
var cache = {};
|
|
10738
10854
|
for (var i = 0; i < entityIds.length; i++) {
|
|
10739
10855
|
var id = entityIds[i];
|
|
10740
10856
|
var state = this.GetState({
|
|
@@ -10749,12 +10865,12 @@ var VisualsRegister;
|
|
|
10749
10865
|
labelled: labelled ? true : null
|
|
10750
10866
|
});
|
|
10751
10867
|
if (doLabel) {
|
|
10752
|
-
|
|
10868
|
+
this.queueUpdate({
|
|
10869
|
+
entityId: id,
|
|
10870
|
+
refresh: false
|
|
10871
|
+
});
|
|
10753
10872
|
}
|
|
10754
10873
|
}
|
|
10755
|
-
if (requestRender != false) {
|
|
10756
|
-
this.viewer.scene.requestRender();
|
|
10757
|
-
}
|
|
10758
10874
|
};
|
|
10759
10875
|
/**
|
|
10760
10876
|
* Returns if given entity id is labelled.
|
|
@@ -10773,7 +10889,6 @@ var VisualsRegister;
|
|
|
10773
10889
|
* @param params
|
|
10774
10890
|
*/
|
|
10775
10891
|
Register.prototype.ClearLabelled = function (params) {
|
|
10776
|
-
var cache = {};
|
|
10777
10892
|
var toUpdateIds = [];
|
|
10778
10893
|
this.ForEachState(function (state) {
|
|
10779
10894
|
if (state.labelled == null || state.labelled === undefined) {
|
|
@@ -10786,10 +10901,10 @@ var VisualsRegister;
|
|
|
10786
10901
|
});
|
|
10787
10902
|
for (var i = 0; i < toUpdateIds.length; i++) {
|
|
10788
10903
|
var id = toUpdateIds[i];
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10904
|
+
this.queueUpdate({
|
|
10905
|
+
entityId: id,
|
|
10906
|
+
refresh: false
|
|
10907
|
+
});
|
|
10793
10908
|
}
|
|
10794
10909
|
};
|
|
10795
10910
|
/**
|
|
@@ -11208,7 +11323,10 @@ var VisualsRegister;
|
|
|
11208
11323
|
markEntity(this, rego, rego.visual, false);
|
|
11209
11324
|
// Run any updates on the visual based on the calculated state.
|
|
11210
11325
|
// Eg: visibility, opacity, selection, etc.
|
|
11211
|
-
|
|
11326
|
+
this.queueUpdate({
|
|
11327
|
+
entityId: entityId,
|
|
11328
|
+
refresh: true
|
|
11329
|
+
});
|
|
11212
11330
|
(_b = this.onUpdate) === null || _b === void 0 ? void 0 : _b.Trigger({
|
|
11213
11331
|
rego: rego,
|
|
11214
11332
|
type: EVisualUpdateType.Add,
|
|
@@ -11297,7 +11415,6 @@ var VisualsRegister;
|
|
|
11297
11415
|
if (retainTagIds == null || retainTagIds === undefined) {
|
|
11298
11416
|
retainTagIds = [];
|
|
11299
11417
|
}
|
|
11300
|
-
var cache = {};
|
|
11301
11418
|
// TODO: refactor.
|
|
11302
11419
|
// Currently this was made by merging two functions.
|
|
11303
11420
|
if (menuItemId && !entityId) {
|
|
@@ -11330,7 +11447,10 @@ var VisualsRegister;
|
|
|
11330
11447
|
rego: rego
|
|
11331
11448
|
});
|
|
11332
11449
|
if (doesInclude) {
|
|
11333
|
-
|
|
11450
|
+
this.queueUpdate({
|
|
11451
|
+
entityId: entityId_4,
|
|
11452
|
+
refresh: false
|
|
11453
|
+
});
|
|
11334
11454
|
}
|
|
11335
11455
|
}
|
|
11336
11456
|
}
|
|
@@ -11361,7 +11481,10 @@ var VisualsRegister;
|
|
|
11361
11481
|
});
|
|
11362
11482
|
this_1.rego[entityId] = entityRegos.filter(function (r) { return r.menuItemId !== menuItemId_2; });
|
|
11363
11483
|
if (doUpdate && menuItemId_2) {
|
|
11364
|
-
|
|
11484
|
+
this_1.queueUpdate({
|
|
11485
|
+
entityId: entityId,
|
|
11486
|
+
refresh: false
|
|
11487
|
+
});
|
|
11365
11488
|
}
|
|
11366
11489
|
};
|
|
11367
11490
|
var this_1 = this;
|
|
@@ -11392,14 +11515,14 @@ var VisualsRegister;
|
|
|
11392
11515
|
rego: rego
|
|
11393
11516
|
});
|
|
11394
11517
|
if (doUpdate && menuItemId) {
|
|
11395
|
-
|
|
11518
|
+
this.queueUpdate({
|
|
11519
|
+
entityId: entityId_5,
|
|
11520
|
+
refresh: false
|
|
11521
|
+
});
|
|
11396
11522
|
}
|
|
11397
11523
|
}
|
|
11398
11524
|
}
|
|
11399
11525
|
}
|
|
11400
|
-
if (requestRender != false) {
|
|
11401
|
-
this.viewer.scene.requestRender();
|
|
11402
|
-
}
|
|
11403
11526
|
};
|
|
11404
11527
|
/**
|
|
11405
11528
|
* Returns an array of drilled visuals associated with this register.
|
|
@@ -11469,16 +11592,15 @@ var VisualsRegister;
|
|
|
11469
11592
|
}
|
|
11470
11593
|
};
|
|
11471
11594
|
Register.prototype.updateAllEntities = function (params) {
|
|
11472
|
-
var cache = {};
|
|
11473
11595
|
for (var entityId in this.rego) {
|
|
11474
11596
|
var regos = this.rego[entityId];
|
|
11475
11597
|
if (regos && regos.length) {
|
|
11476
|
-
|
|
11598
|
+
this.queueUpdate({
|
|
11599
|
+
entityId: entityId,
|
|
11600
|
+
refresh: (params === null || params === void 0 ? void 0 : params.refresh) == null ? true : params.refresh
|
|
11601
|
+
});
|
|
11477
11602
|
}
|
|
11478
11603
|
}
|
|
11479
|
-
if ((params === null || params === void 0 ? void 0 : params.requestRender) != false) {
|
|
11480
|
-
this.viewer.scene.requestRender();
|
|
11481
|
-
}
|
|
11482
11604
|
};
|
|
11483
11605
|
/**
|
|
11484
11606
|
* Sets opacity for given set of entities.
|
|
@@ -11490,54 +11612,22 @@ var VisualsRegister;
|
|
|
11490
11612
|
var opacity = params.opacity, entityIds = params.entityIds, menuItemId = params.menuItemId, requestRender = params.requestRender;
|
|
11491
11613
|
for (var _i = 0, entityIds_2 = entityIds; _i < entityIds_2.length; _i++) {
|
|
11492
11614
|
var entityId = entityIds_2[_i];
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
this.setStateValues({
|
|
11508
|
-
entityId: entityId,
|
|
11509
|
-
menuItemId: menuItemId,
|
|
11510
|
-
// Null means it will be deleted from the object.
|
|
11511
|
-
opacity: opacity == 1 ? null : opacity
|
|
11512
|
-
});
|
|
11513
|
-
}
|
|
11514
|
-
if (opacity == 1 || opacity == null) {
|
|
11515
|
-
EntityUtils.RevertOpacity({
|
|
11516
|
-
entity: rego.visual,
|
|
11517
|
-
viewer: this.viewer,
|
|
11518
|
-
requestRender: false
|
|
11519
|
-
});
|
|
11520
|
-
}
|
|
11521
|
-
else {
|
|
11522
|
-
EntityUtils.SetOpacity({
|
|
11523
|
-
entity: rego.visual,
|
|
11524
|
-
opacity: opacity,
|
|
11525
|
-
viewer: this.viewer,
|
|
11526
|
-
requestRender: false
|
|
11527
|
-
});
|
|
11528
|
-
}
|
|
11529
|
-
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({
|
|
11530
|
-
rego: rego,
|
|
11531
|
-
type: EVisualUpdateType.Update,
|
|
11532
|
-
entityId: rego.entityId,
|
|
11533
|
-
opacity: opacity
|
|
11534
|
-
});
|
|
11535
|
-
}
|
|
11615
|
+
this.setStateValues({
|
|
11616
|
+
entityId: entityId,
|
|
11617
|
+
menuItemId: menuItemId,
|
|
11618
|
+
opacity: opacity
|
|
11619
|
+
});
|
|
11620
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger({
|
|
11621
|
+
type: EVisualUpdateType.Update,
|
|
11622
|
+
entityId: entityId,
|
|
11623
|
+
opacity: opacity
|
|
11624
|
+
});
|
|
11625
|
+
this.queueUpdate({
|
|
11626
|
+
entityId: entityId,
|
|
11627
|
+
refresh: {
|
|
11628
|
+
opacity: true
|
|
11536
11629
|
}
|
|
11537
|
-
}
|
|
11538
|
-
}
|
|
11539
|
-
if (requestRender != false) {
|
|
11540
|
-
this.viewer.scene.requestRender();
|
|
11630
|
+
});
|
|
11541
11631
|
}
|
|
11542
11632
|
};
|
|
11543
11633
|
/**
|
|
@@ -11579,32 +11669,19 @@ var VisualsRegister;
|
|
|
11579
11669
|
};
|
|
11580
11670
|
Register.prototype.ClearOpacity = function (params) {
|
|
11581
11671
|
var _this = this;
|
|
11582
|
-
var
|
|
11583
|
-
var cleared = [];
|
|
11672
|
+
var clearedIds = [];
|
|
11584
11673
|
this.ForEachState(function (state, key) {
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
continue;
|
|
11674
|
+
if (!clearedIds.includes(state.entityId) && state.opacity != null) {
|
|
11675
|
+
_this.queueUpdate({
|
|
11676
|
+
entityId: state.entityId,
|
|
11677
|
+
refresh: {
|
|
11678
|
+
opacity: true
|
|
11591
11679
|
}
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
entity: rego.visual,
|
|
11595
|
-
viewer: _this.viewer,
|
|
11596
|
-
requestRender: false
|
|
11597
|
-
});
|
|
11598
|
-
changed = true;
|
|
11599
|
-
cleared.push(rego);
|
|
11600
|
-
}
|
|
11601
|
-
}
|
|
11680
|
+
});
|
|
11681
|
+
clearedIds.push(state.entityId);
|
|
11602
11682
|
}
|
|
11603
11683
|
delete state.opacity;
|
|
11604
11684
|
});
|
|
11605
|
-
if ((params === null || params === void 0 ? void 0 : params.requestRender) != false && changed) {
|
|
11606
|
-
this.viewer.scene.requestRender();
|
|
11607
|
-
}
|
|
11608
11685
|
};
|
|
11609
11686
|
/**
|
|
11610
11687
|
* Returns a dictionary containing entityId -> opacity values.
|
|
@@ -29264,7 +29341,7 @@ var WidgetViewBar = /** @class */ (function (_super) {
|
|
|
29264
29341
|
return WidgetViewBar;
|
|
29265
29342
|
}(Widget.AWidget));
|
|
29266
29343
|
|
|
29267
|
-
var VERSION = "4.8.
|
|
29344
|
+
var VERSION = "4.8.9";
|
|
29268
29345
|
|
|
29269
29346
|
export { VERSION, CesiumViewMonitor, ViewerUtils, ViewerEventTracker, MenuItemManager, EntityRenderEngine, EntityRenderEnginePoint, EntityRenderEnginePolyline, EntityRenderEnginePolygon, EntityRenderEngineModel3d, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, DataLabRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, VIEWER_VIEW_BAR_WIDGET_KEY, WidgetViewBar, WidgetControlViewBar, WidgetControlViewBarSearch, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
|
|
29270
29347
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|