bruce-cesium 3.7.4 → 3.7.5
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 +141 -49
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +140 -48
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/entity-render-engine.js +32 -24
- package/dist/lib/rendering/entity-render-engine.js.map +1 -1
- package/dist/lib/rendering/getters/entity-filter-getter.js +69 -2
- package/dist/lib/rendering/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js +2 -1
- package/dist/lib/rendering/render-managers/common/shared-getters.js.map +1 -1
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js +37 -20
- package/dist/lib/rendering/render-managers/entities/entities-render-manager.js.map +1 -1
- package/dist/lib/rendering/visuals-register.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/getters/entity-filter-getter.d.ts +15 -1
- package/dist/types/rendering/render-managers/common/shared-getters.d.ts +1 -0
- package/dist/types/rendering/visuals-register.d.ts +2 -0
- package/package.json +2 -2
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -4797,11 +4797,11 @@
|
|
|
4797
4797
|
}
|
|
4798
4798
|
(function (EntityRenderEngine) {
|
|
4799
4799
|
function Render(params) {
|
|
4800
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4800
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
4801
4801
|
return __awaiter(this, void 0, void 0, function () {
|
|
4802
4802
|
var groupRenderParams, i, entity, geometry, cEntities, models, multiGeometry, polygons, polylines, points, i, entity, id, zoomItem, displayType, existingRego, newRenderId, oldRenderId, mParams, mEntities, i, entity, id, cEntity, _loop_1, i, pParams, pEntities, i, entity, cEntity, pParams, pEntities, i, entity, cEntity, pParams, pEntities, i, entity, cEntity;
|
|
4803
|
-
return __generator(this, function (
|
|
4804
|
-
switch (
|
|
4803
|
+
return __generator(this, function (_m) {
|
|
4804
|
+
switch (_m.label) {
|
|
4805
4805
|
case 0:
|
|
4806
4806
|
groupRenderParams = {
|
|
4807
4807
|
apiGetter: params.apiGetter,
|
|
@@ -4849,7 +4849,11 @@
|
|
|
4849
4849
|
});
|
|
4850
4850
|
newRenderId = getRenderGroupId(zoomItem, (_b = params.viewer) === null || _b === void 0 ? void 0 : _b.terrainProvider);
|
|
4851
4851
|
oldRenderId = (_c = existingRego === null || existingRego === void 0 ? void 0 : existingRego.visual) === null || _c === void 0 ? void 0 : _c._renderGroup;
|
|
4852
|
-
if (!params.force &&
|
|
4852
|
+
if (!params.force &&
|
|
4853
|
+
newRenderId == oldRenderId &&
|
|
4854
|
+
!(existingRego === null || existingRego === void 0 ? void 0 : existingRego.stale) &&
|
|
4855
|
+
// If historic metadata is different then it's also stale.
|
|
4856
|
+
((existingRego === null || existingRego === void 0 ? void 0 : existingRego.historicDateTime) == ((_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d.historicDateTime))) {
|
|
4853
4857
|
// No sorting category needed. Already rendered the way we want.
|
|
4854
4858
|
cEntities[id] = existingRego.visual;
|
|
4855
4859
|
}
|
|
@@ -4859,12 +4863,16 @@
|
|
|
4859
4863
|
cEntities[id] = existingRego.visual;
|
|
4860
4864
|
// Flag as no longer stale as we're unlikely to recreate the rego if we're reusing the graphic.
|
|
4861
4865
|
existingRego.stale = false;
|
|
4866
|
+
// Update metadata for the same reason.
|
|
4867
|
+
existingRego.historicDateTime = (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.historicDateTime;
|
|
4868
|
+
existingRego.historicAttrKey = (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.historicAttrKey;
|
|
4869
|
+
existingRego.entityTypeId = entity.Bruce["EntityType.ID"];
|
|
4862
4870
|
}
|
|
4863
4871
|
if (displayType == bruceModels.ZoomControl.EDisplayType.Model3D) {
|
|
4864
4872
|
models.push(entity);
|
|
4865
4873
|
}
|
|
4866
4874
|
else if (displayType == bruceModels.ZoomControl.EDisplayType.Geometry) {
|
|
4867
|
-
if ((
|
|
4875
|
+
if ((_h = (_g = entity.geometry) === null || _g === void 0 ? void 0 : _g.MultiGeometry) === null || _h === void 0 ? void 0 : _h.length) {
|
|
4868
4876
|
multiGeometry.push(entity);
|
|
4869
4877
|
}
|
|
4870
4878
|
else {
|
|
@@ -4882,7 +4890,7 @@
|
|
|
4882
4890
|
mParams = __assign(__assign({}, groupRenderParams), { rendered: cEntities, entities: models });
|
|
4883
4891
|
return [4 /*yield*/, Model3d.RenderGroup(mParams)];
|
|
4884
4892
|
case 1:
|
|
4885
|
-
mEntities =
|
|
4893
|
+
mEntities = _m.sent();
|
|
4886
4894
|
for (i = 0; i < mParams.entities.length; i++) {
|
|
4887
4895
|
entity = mParams.entities[i];
|
|
4888
4896
|
id = entity.Bruce.ID;
|
|
@@ -4894,16 +4902,16 @@
|
|
|
4894
4902
|
multiGeometry.push(entity);
|
|
4895
4903
|
}
|
|
4896
4904
|
}
|
|
4897
|
-
|
|
4905
|
+
_m.label = 2;
|
|
4898
4906
|
case 2:
|
|
4899
4907
|
if (!(multiGeometry.length > 0)) return [3 /*break*/, 6];
|
|
4900
4908
|
_loop_1 = function (i) {
|
|
4901
4909
|
var entity, pParams, zoomItem, j, subEntity, cPoly, rendered, cLines, cPoints, rootEntity_1, firstEntity;
|
|
4902
|
-
return __generator(this, function (
|
|
4903
|
-
switch (
|
|
4910
|
+
return __generator(this, function (_o) {
|
|
4911
|
+
switch (_o.label) {
|
|
4904
4912
|
case 0:
|
|
4905
4913
|
entity = multiGeometry[i];
|
|
4906
|
-
if (!((
|
|
4914
|
+
if (!((_k = (_j = entity.geometry) === null || _j === void 0 ? void 0 : _j.MultiGeometry) === null || _k === void 0 ? void 0 : _k.length)) {
|
|
4907
4915
|
polygons.push(entity);
|
|
4908
4916
|
return [2 /*return*/, "continue"];
|
|
4909
4917
|
}
|
|
@@ -4916,7 +4924,7 @@
|
|
|
4916
4924
|
}
|
|
4917
4925
|
return [4 /*yield*/, Polygon.RenderGroup(pParams)];
|
|
4918
4926
|
case 1:
|
|
4919
|
-
cPoly =
|
|
4927
|
+
cPoly = _o.sent();
|
|
4920
4928
|
Object.keys(cPoly).forEach(function (key) {
|
|
4921
4929
|
if (cPoly[key]) {
|
|
4922
4930
|
pParams.entities = pParams.entities.filter(function (e) { return e.Bruce.ID != key; });
|
|
@@ -4925,7 +4933,7 @@
|
|
|
4925
4933
|
rendered = Object.values(cPoly);
|
|
4926
4934
|
return [4 /*yield*/, Polyline.RenderGroup(pParams)];
|
|
4927
4935
|
case 2:
|
|
4928
|
-
cLines =
|
|
4936
|
+
cLines = _o.sent();
|
|
4929
4937
|
Object.keys(cLines).forEach(function (key) {
|
|
4930
4938
|
if (cLines[key]) {
|
|
4931
4939
|
pParams.entities = pParams.entities.filter(function (e) { return e.Bruce.ID != key; });
|
|
@@ -4935,9 +4943,9 @@
|
|
|
4935
4943
|
if (!!rendered.length) return [3 /*break*/, 4];
|
|
4936
4944
|
return [4 /*yield*/, Point.RenderGroup(pParams)];
|
|
4937
4945
|
case 3:
|
|
4938
|
-
cPoints =
|
|
4946
|
+
cPoints = _o.sent();
|
|
4939
4947
|
rendered = rendered.concat(Object.values(cPoints));
|
|
4940
|
-
|
|
4948
|
+
_o.label = 4;
|
|
4941
4949
|
case 4:
|
|
4942
4950
|
rendered = rendered.filter(function (x) { return x != null; });
|
|
4943
4951
|
if (rendered.length) {
|
|
@@ -4945,7 +4953,7 @@
|
|
|
4945
4953
|
id: bruceModels.ObjectUtils.UId(10)
|
|
4946
4954
|
});
|
|
4947
4955
|
rootEntity_1._siblingGraphics = [];
|
|
4948
|
-
rootEntity_1._renderGroup = getRenderGroupId(zoomItem, (
|
|
4956
|
+
rootEntity_1._renderGroup = getRenderGroupId(zoomItem, (_l = params.viewer) === null || _l === void 0 ? void 0 : _l.terrainProvider);
|
|
4949
4957
|
rootEntity_1._siblingGraphics = rootEntity_1._siblingGraphics.concat(rendered);
|
|
4950
4958
|
cEntities[entity.Bruce.ID] = rootEntity_1;
|
|
4951
4959
|
firstEntity = rendered[0];
|
|
@@ -4964,13 +4972,13 @@
|
|
|
4964
4972
|
});
|
|
4965
4973
|
};
|
|
4966
4974
|
i = 0;
|
|
4967
|
-
|
|
4975
|
+
_m.label = 3;
|
|
4968
4976
|
case 3:
|
|
4969
4977
|
if (!(i < multiGeometry.length)) return [3 /*break*/, 6];
|
|
4970
4978
|
return [5 /*yield**/, _loop_1(i)];
|
|
4971
4979
|
case 4:
|
|
4972
|
-
|
|
4973
|
-
|
|
4980
|
+
_m.sent();
|
|
4981
|
+
_m.label = 5;
|
|
4974
4982
|
case 5:
|
|
4975
4983
|
i++;
|
|
4976
4984
|
return [3 /*break*/, 3];
|
|
@@ -4979,7 +4987,7 @@
|
|
|
4979
4987
|
pParams = __assign(__assign({}, groupRenderParams), { entities: polygons, rendered: cEntities });
|
|
4980
4988
|
return [4 /*yield*/, Polygon.RenderGroup(pParams)];
|
|
4981
4989
|
case 7:
|
|
4982
|
-
pEntities =
|
|
4990
|
+
pEntities = _m.sent();
|
|
4983
4991
|
for (i = 0; i < pParams.entities.length; i++) {
|
|
4984
4992
|
entity = pParams.entities[i];
|
|
4985
4993
|
cEntity = pEntities[entity.Bruce.ID];
|
|
@@ -4990,13 +4998,13 @@
|
|
|
4990
4998
|
polylines.push(entity);
|
|
4991
4999
|
}
|
|
4992
5000
|
}
|
|
4993
|
-
|
|
5001
|
+
_m.label = 8;
|
|
4994
5002
|
case 8:
|
|
4995
5003
|
if (!(polylines.length > 0)) return [3 /*break*/, 10];
|
|
4996
5004
|
pParams = __assign(__assign({}, groupRenderParams), { entities: polylines, rendered: cEntities });
|
|
4997
5005
|
return [4 /*yield*/, Polyline.RenderGroup(pParams)];
|
|
4998
5006
|
case 9:
|
|
4999
|
-
pEntities =
|
|
5007
|
+
pEntities = _m.sent();
|
|
5000
5008
|
for (i = 0; i < pParams.entities.length; i++) {
|
|
5001
5009
|
entity = pParams.entities[i];
|
|
5002
5010
|
cEntity = pEntities[entity.Bruce.ID];
|
|
@@ -5007,13 +5015,13 @@
|
|
|
5007
5015
|
points.push(entity);
|
|
5008
5016
|
}
|
|
5009
5017
|
}
|
|
5010
|
-
|
|
5018
|
+
_m.label = 10;
|
|
5011
5019
|
case 10:
|
|
5012
5020
|
if (!(points.length > 0)) return [3 /*break*/, 12];
|
|
5013
5021
|
pParams = __assign(__assign({}, groupRenderParams), { entities: points, rendered: cEntities });
|
|
5014
5022
|
return [4 /*yield*/, Point.RenderGroup(pParams)];
|
|
5015
5023
|
case 11:
|
|
5016
|
-
pEntities =
|
|
5024
|
+
pEntities = _m.sent();
|
|
5017
5025
|
for (i = 0; i < pParams.entities.length; i++) {
|
|
5018
5026
|
entity = pParams.entities[i];
|
|
5019
5027
|
cEntity = pEntities[entity.Bruce.ID];
|
|
@@ -5021,7 +5029,7 @@
|
|
|
5021
5029
|
cEntities[entity.Bruce.ID] = cEntity;
|
|
5022
5030
|
}
|
|
5023
5031
|
}
|
|
5024
|
-
|
|
5032
|
+
_m.label = 12;
|
|
5025
5033
|
case 12: return [2 /*return*/, cEntities];
|
|
5026
5034
|
}
|
|
5027
5035
|
});
|
|
@@ -9730,7 +9738,8 @@
|
|
|
9730
9738
|
// So for multiple tags we'll manually sort on UI end...
|
|
9731
9739
|
tagIds: (tagsToRender === null || tagsToRender === void 0 ? void 0 : tagsToRender.length) ? tagsToRender : [],
|
|
9732
9740
|
debugShowBounds: Boolean(window === null || window === void 0 ? void 0 : window.ENTITIES_RENDER_MANAGER_SHOW_BOUNDS),
|
|
9733
|
-
cdn: this.item.cdnEnabled
|
|
9741
|
+
cdn: this.item.cdnEnabled,
|
|
9742
|
+
historicAttrKey: this.item.BruceEntity.historicAttrKey
|
|
9734
9743
|
});
|
|
9735
9744
|
var minMax = exports.RenderManager.GetZoomMinMax({
|
|
9736
9745
|
zoomControl: this.item.CameraZoomSettings
|
|
@@ -10292,23 +10301,37 @@
|
|
|
10292
10301
|
* @returns
|
|
10293
10302
|
*/
|
|
10294
10303
|
Manager.prototype.renderAsIndividuals = function (entities, force) {
|
|
10295
|
-
var _a, _b, _c;
|
|
10304
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
10296
10305
|
if (force === void 0) { force = false; }
|
|
10297
10306
|
return __awaiter(this, void 0, void 0, function () {
|
|
10298
|
-
var cEntities, i, entity, id, cEntity, visual, wasClustered, tagIds, rego;
|
|
10299
|
-
return __generator(this, function (
|
|
10300
|
-
switch (
|
|
10301
|
-
case 0:
|
|
10302
|
-
|
|
10303
|
-
|
|
10304
|
-
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10307
|
+
var toRemove, i, entity, cEntities, i, entity, id, cEntity, visual, wasClustered, tagIds, rego;
|
|
10308
|
+
return __generator(this, function (_h) {
|
|
10309
|
+
switch (_h.label) {
|
|
10310
|
+
case 0:
|
|
10311
|
+
if ((_a = this.item.BruceEntity) === null || _a === void 0 ? void 0 : _a.historicAttrKey) {
|
|
10312
|
+
toRemove = entities.filter(function (x) { var _a; return !((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10313
|
+
for (i = 0; i < toRemove.length; i++) {
|
|
10314
|
+
entity = toRemove[i];
|
|
10315
|
+
this.visualsManager.RemoveRegos({
|
|
10316
|
+
entityId: entity.Bruce.ID,
|
|
10317
|
+
menuItemId: this.item.id,
|
|
10318
|
+
requestRender: false
|
|
10319
|
+
});
|
|
10320
|
+
(_b = this.clustering) === null || _b === void 0 ? void 0 : _b.RemoveEntity(entity.Bruce.ID, false);
|
|
10321
|
+
}
|
|
10322
|
+
entities = entities.filter(function (x) { var _a; return !!((_a = x.Bruce) === null || _a === void 0 ? void 0 : _a.historicAttrKey); });
|
|
10323
|
+
}
|
|
10324
|
+
return [4 /*yield*/, exports.EntityRenderEngine.Render({
|
|
10325
|
+
viewer: this.viewer,
|
|
10326
|
+
apiGetter: this.apiGetter,
|
|
10327
|
+
entities: entities,
|
|
10328
|
+
menuItemId: this.item.id,
|
|
10329
|
+
visualRegister: this.visualsManager,
|
|
10330
|
+
zoomControl: this.item.CameraZoomSettings,
|
|
10331
|
+
force: force
|
|
10332
|
+
})];
|
|
10310
10333
|
case 1:
|
|
10311
|
-
cEntities =
|
|
10334
|
+
cEntities = _h.sent();
|
|
10312
10335
|
if (this.disposed) {
|
|
10313
10336
|
this.doDispose();
|
|
10314
10337
|
return [2 /*return*/];
|
|
@@ -10319,13 +10342,13 @@
|
|
|
10319
10342
|
cEntity = cEntities[id];
|
|
10320
10343
|
this.renderedEntities[id] = !!cEntity;
|
|
10321
10344
|
if (cEntity) {
|
|
10322
|
-
visual = (
|
|
10345
|
+
visual = (_c = this.visualsManager.GetRego({
|
|
10323
10346
|
entityId: id,
|
|
10324
10347
|
menuItemId: this.item.id
|
|
10325
|
-
})) === null ||
|
|
10348
|
+
})) === null || _c === void 0 ? void 0 : _c.visual;
|
|
10326
10349
|
if (!visual || visual != cEntity) {
|
|
10327
10350
|
wasClustered = this.clustering ? this.clustering.AddEntity(id, cEntity, false) : false;
|
|
10328
|
-
tagIds = (
|
|
10351
|
+
tagIds = (_d = entity.Bruce) === null || _d === void 0 ? void 0 : _d["Layer.ID"];
|
|
10329
10352
|
rego = {
|
|
10330
10353
|
entityId: id,
|
|
10331
10354
|
menuItemId: this.item.id,
|
|
@@ -10336,7 +10359,9 @@
|
|
|
10336
10359
|
tagIds: tagIds ? [].concat(tagIds) : [],
|
|
10337
10360
|
overrideShow: wasClustered ? false : null,
|
|
10338
10361
|
name: cEntity.name,
|
|
10339
|
-
cdn: this.item.cdnEnabled
|
|
10362
|
+
cdn: this.item.cdnEnabled,
|
|
10363
|
+
historicDateTime: (_e = entity.Bruce) === null || _e === void 0 ? void 0 : _e.historicDateTime,
|
|
10364
|
+
historicAttrKey: (_f = entity.Bruce) === null || _f === void 0 ? void 0 : _f.historicAttrKey
|
|
10340
10365
|
};
|
|
10341
10366
|
this.visualsManager.AddRego({
|
|
10342
10367
|
rego: rego,
|
|
@@ -10350,7 +10375,7 @@
|
|
|
10350
10375
|
menuItemId: this.item.id,
|
|
10351
10376
|
requestRender: false
|
|
10352
10377
|
});
|
|
10353
|
-
(
|
|
10378
|
+
(_g = this.clustering) === null || _g === void 0 ? void 0 : _g.RemoveEntity(id, false);
|
|
10354
10379
|
}
|
|
10355
10380
|
}
|
|
10356
10381
|
this.viewer.scene.requestRender();
|
|
@@ -13551,12 +13576,13 @@
|
|
|
13551
13576
|
EStatus["Loading"] = "LOADING";
|
|
13552
13577
|
})(EStatus = EntityFilterGetter.EStatus || (EntityFilterGetter.EStatus = {}));
|
|
13553
13578
|
var Getter = /** @class */ (function () {
|
|
13554
|
-
function Getter(api, viewPort, typeId, batchSize, attrFilter, viaCdn) {
|
|
13579
|
+
function Getter(api, viewer, viewPort, typeId, batchSize, attrFilter, historicAttrKey, viaCdn) {
|
|
13555
13580
|
this.onUpdate = null;
|
|
13556
13581
|
this.LastStateUpdates = {};
|
|
13557
13582
|
this.onStateUpdate = null;
|
|
13558
13583
|
this.onScanUpdate = null;
|
|
13559
13584
|
this.viewPortChangeRemoval = null;
|
|
13585
|
+
this.viewerDateTimeChangeRemoval = null;
|
|
13560
13586
|
this.cells = null;
|
|
13561
13587
|
this.registeredItems = {};
|
|
13562
13588
|
this.getterLoopId = 0;
|
|
@@ -13567,10 +13593,12 @@
|
|
|
13567
13593
|
this.viewCenter = null;
|
|
13568
13594
|
this.api = api;
|
|
13569
13595
|
this.typeId = typeId;
|
|
13596
|
+
this.historicAttrKey = historicAttrKey;
|
|
13570
13597
|
this.viaCdn = Boolean(viaCdn);
|
|
13571
13598
|
this.batchSize = isNaN(batchSize) ? 300 : batchSize;
|
|
13572
13599
|
this.viewPort = viewPort;
|
|
13573
13600
|
this.attrFilter = attrFilter;
|
|
13601
|
+
this.viewer = viewer;
|
|
13574
13602
|
this.updateBounds();
|
|
13575
13603
|
}
|
|
13576
13604
|
Object.defineProperty(Getter.prototype, "OnUpdate", {
|
|
@@ -13609,7 +13637,14 @@
|
|
|
13609
13637
|
* @returns
|
|
13610
13638
|
*/
|
|
13611
13639
|
Getter.prototype.getIntegrityId = function () {
|
|
13612
|
-
|
|
13640
|
+
var integrity = this.tagIds == null ? "" : this.tagIds.join();
|
|
13641
|
+
if (this.historicAttrKey) {
|
|
13642
|
+
integrity += this.historicAttrKey;
|
|
13643
|
+
if (this.historicAttrDateTime) {
|
|
13644
|
+
integrity += this.historicAttrDateTime;
|
|
13645
|
+
}
|
|
13646
|
+
}
|
|
13647
|
+
return integrity;
|
|
13613
13648
|
};
|
|
13614
13649
|
Getter.prototype.viewAreaSub = function () {
|
|
13615
13650
|
var _this = this;
|
|
@@ -13622,6 +13657,57 @@
|
|
|
13622
13657
|
Getter.prototype.viewAreaDispose = function () {
|
|
13623
13658
|
var _a;
|
|
13624
13659
|
(_a = this.viewPortChangeRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
13660
|
+
this.viewPortChangeRemoval = null;
|
|
13661
|
+
};
|
|
13662
|
+
/**
|
|
13663
|
+
* Monitors the Cesium viewer and updates the historic data filter values.
|
|
13664
|
+
* If there is no historic attr set, this will do nothing.
|
|
13665
|
+
*/
|
|
13666
|
+
Getter.prototype.viewerDateTimeSub = function () {
|
|
13667
|
+
var _this = this;
|
|
13668
|
+
this.viewerDateTimeDispose();
|
|
13669
|
+
if (!this.historicAttrKey) {
|
|
13670
|
+
return;
|
|
13671
|
+
}
|
|
13672
|
+
var delayQueue = new bruceModels.DelayQueue(function () {
|
|
13673
|
+
var current = _this.getIntegrityId();
|
|
13674
|
+
_this.updateHistoricDateTime();
|
|
13675
|
+
if (current != _this.getIntegrityId()) {
|
|
13676
|
+
_this.updateState();
|
|
13677
|
+
}
|
|
13678
|
+
}, 250);
|
|
13679
|
+
var postUpdateRemoval = this.viewer.scene.postUpdate.addEventListener(function () {
|
|
13680
|
+
if (delayQueue) {
|
|
13681
|
+
delayQueue.Call();
|
|
13682
|
+
}
|
|
13683
|
+
});
|
|
13684
|
+
this.viewerDateTimeChangeRemoval = function () {
|
|
13685
|
+
delayQueue === null || delayQueue === void 0 ? void 0 : delayQueue.Dispose();
|
|
13686
|
+
postUpdateRemoval === null || postUpdateRemoval === void 0 ? void 0 : postUpdateRemoval();
|
|
13687
|
+
delayQueue = null;
|
|
13688
|
+
postUpdateRemoval = null;
|
|
13689
|
+
};
|
|
13690
|
+
};
|
|
13691
|
+
Getter.prototype.updateHistoricDateTime = function () {
|
|
13692
|
+
var newDateTime = Cesium.JulianDate.toDate(this.viewer.clock.currentTime);
|
|
13693
|
+
// Has previous value. Let's compare.
|
|
13694
|
+
if (this.historicAttrDateTime) {
|
|
13695
|
+
var oldDateTime = new Date(this.historicAttrDateTime);
|
|
13696
|
+
// Change must be at least 0.1 seconds.
|
|
13697
|
+
// TODO: This is just a random value I picked. We may need to make a setting or refine this.
|
|
13698
|
+
if (Math.abs(newDateTime.getTime() - oldDateTime.getTime()) < 100) {
|
|
13699
|
+
return;
|
|
13700
|
+
}
|
|
13701
|
+
}
|
|
13702
|
+
this.historicAttrDateTime = newDateTime.toISOString();
|
|
13703
|
+
// Set min/max to be the value increased/decreased by 1 minute.
|
|
13704
|
+
this.historicAttrDateTimeMin = new Date(newDateTime.getTime() - 60000).toISOString();
|
|
13705
|
+
this.historicAttrDateTimeMax = new Date(newDateTime.getTime() + 60000).toISOString();
|
|
13706
|
+
};
|
|
13707
|
+
Getter.prototype.viewerDateTimeDispose = function () {
|
|
13708
|
+
var _a;
|
|
13709
|
+
(_a = this.viewerDateTimeChangeRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
13710
|
+
this.viewerDateTimeChangeRemoval = null;
|
|
13625
13711
|
};
|
|
13626
13712
|
Getter.prototype.GetMenuItems = function () {
|
|
13627
13713
|
return Object.keys(this.registeredItems);
|
|
@@ -13681,8 +13767,10 @@
|
|
|
13681
13767
|
this.minHeight = minHeight;
|
|
13682
13768
|
this.maxHeight = maxHeight;
|
|
13683
13769
|
this.updateBounds();
|
|
13770
|
+
this.updateHistoricDateTime();
|
|
13684
13771
|
this.startGetterLoop();
|
|
13685
13772
|
this.viewAreaSub();
|
|
13773
|
+
this.viewerDateTimeSub();
|
|
13686
13774
|
}
|
|
13687
13775
|
else {
|
|
13688
13776
|
this.getterLoopId += 1;
|
|
@@ -13778,6 +13866,9 @@
|
|
|
13778
13866
|
_j.trys.push([8, 10, , 11]);
|
|
13779
13867
|
return [4 /*yield*/, bruceModels.Entity.GetList({
|
|
13780
13868
|
api: this.api,
|
|
13869
|
+
historicKey: this.historicAttrKey,
|
|
13870
|
+
historicFrom: this.historicAttrKey ? this.historicAttrDateTimeMin : null,
|
|
13871
|
+
historicTo: this.historicAttrKey ? this.historicAttrDateTimeMax : null,
|
|
13781
13872
|
filter: {
|
|
13782
13873
|
pageSize: PAGE_SIZE,
|
|
13783
13874
|
pageIndex: curCell.FetchPageIndex,
|
|
@@ -13875,6 +13966,7 @@
|
|
|
13875
13966
|
cacheKey += params.batchSize;
|
|
13876
13967
|
cacheKey += String(params.cdn);
|
|
13877
13968
|
cacheKey += JSON.stringify(params.tagIds ? params.tagIds : []);
|
|
13969
|
+
cacheKey += params.historicAttrKey ? params.historicAttrKey : "";
|
|
13878
13970
|
// This could potentially crash, but if it crashes here then it would crash during API request anyways.
|
|
13879
13971
|
cacheKey += JSON.stringify(params.attrFilter ? params.attrFilter : {});
|
|
13880
13972
|
return cacheKey;
|
|
@@ -13889,7 +13981,7 @@
|
|
|
13889
13981
|
var cacheKey = createFilterGetterCacheKey(params);
|
|
13890
13982
|
var getter = this.data[cacheKey];
|
|
13891
13983
|
if (!getter) {
|
|
13892
|
-
getter = new EntityFilterGetter.Getter(params.api, params.monitor, params.typeId, params.batchSize, params.attrFilter, params.cdn);
|
|
13984
|
+
getter = new EntityFilterGetter.Getter(params.api, params.viewer, params.monitor, params.typeId, params.batchSize, params.attrFilter, params.historicAttrKey, params.cdn);
|
|
13893
13985
|
this.data[cacheKey] = getter;
|
|
13894
13986
|
/**
|
|
13895
13987
|
* Debug option.
|
|
@@ -23281,7 +23373,7 @@
|
|
|
23281
23373
|
ViewRenderEngine.Render = Render;
|
|
23282
23374
|
})(exports.ViewRenderEngine || (exports.ViewRenderEngine = {}));
|
|
23283
23375
|
|
|
23284
|
-
var VERSION = "3.7.
|
|
23376
|
+
var VERSION = "3.7.5";
|
|
23285
23377
|
|
|
23286
23378
|
exports.VERSION = VERSION;
|
|
23287
23379
|
exports.CesiumParabola = CesiumParabola;
|