bruce-cesium 2.9.2 → 2.9.3
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 +270 -65
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +269 -64
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/other/relations-render-manager.js +220 -50
- package/dist/lib/rendering/render-managers/other/relations-render-manager.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +47 -16
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/other/relations-render-manager.d.ts +6 -0
- package/package.json +1 -1
package/dist/bruce-cesium.es5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, EntityRelationType, DelayQueue, BatchedDataGetter, EntityCoords, EntityFilterGetter, EntitySource, MenuItem, EntityRelation, ENVIRONMENT, ProjectView, ProjectViewBookmark, ProjectViewTile, ProjectViewLegacyTile, ProgramKey, Camera, AbstractApi, EntityAttachment, EntityAttachmentType, EntityAttribute } from 'bruce-models';
|
|
2
2
|
import * as Cesium from 'cesium';
|
|
3
|
-
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate,
|
|
3
|
+
import { Cartographic, Cartesian2, CallbackProperty, Cartesian3, Color, Rectangle, Math as Math$1, JulianDate, HeightReference, DistanceDisplayCondition, NearFarScalar, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, Cesium3DTileColorBlendMode, HeadingPitchRange, Cesium3DTileStyle, createOsmBuildings, KmlDataSource, OrthographicFrustum, EasingFunction, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, defined, createWorldTerrain, CesiumTerrainProvider, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, Model, PolygonPipeline, Matrix4, Matrix3, IonResource, Ion, ColorMaterialProperty, GeometryInstance, ScreenSpaceEventHandler, ScreenSpaceEventType, BoundingSphere } from 'cesium';
|
|
4
4
|
|
|
5
5
|
var TIME_LAG = 300;
|
|
6
6
|
var POSITION_CHECK_TIMER = 950;
|
|
@@ -9871,6 +9871,41 @@ var RelationsRenderManager;
|
|
|
9871
9871
|
relations: this.item.relations
|
|
9872
9872
|
});
|
|
9873
9873
|
};
|
|
9874
|
+
/**
|
|
9875
|
+
* Constructs the rendered state of the menu item from the visuals register.
|
|
9876
|
+
* This will let us see the difference between what the menu item should render vs has rendered.
|
|
9877
|
+
*/
|
|
9878
|
+
Manager.prototype.getRenderedState = function () {
|
|
9879
|
+
var items = [];
|
|
9880
|
+
var regos = this.register.GetRegos({
|
|
9881
|
+
menuItemId: this.item.id
|
|
9882
|
+
});
|
|
9883
|
+
var _loop_1 = function (i) {
|
|
9884
|
+
var rego = regos[i];
|
|
9885
|
+
if (!(rego === null || rego === void 0 ? void 0 : rego.relation)) {
|
|
9886
|
+
return "continue";
|
|
9887
|
+
}
|
|
9888
|
+
var relationTypeId = rego.relation["Relation.Type.ID"];
|
|
9889
|
+
if (!relationTypeId) {
|
|
9890
|
+
return "continue";
|
|
9891
|
+
}
|
|
9892
|
+
var group = items.find(function (x) { return x.relationTypeId == relationTypeId; });
|
|
9893
|
+
var entityId = rego.relation["Principal.Entity.ID"];
|
|
9894
|
+
if (!group) {
|
|
9895
|
+
items.push({
|
|
9896
|
+
relationTypeId: relationTypeId,
|
|
9897
|
+
entityIds: [entityId]
|
|
9898
|
+
});
|
|
9899
|
+
}
|
|
9900
|
+
else if (!group.entityIds.includes(entityId)) {
|
|
9901
|
+
group.entityIds.push(entityId);
|
|
9902
|
+
}
|
|
9903
|
+
};
|
|
9904
|
+
for (var i = 0; i < regos.length; i++) {
|
|
9905
|
+
_loop_1(i);
|
|
9906
|
+
}
|
|
9907
|
+
return items;
|
|
9908
|
+
};
|
|
9874
9909
|
Manager.prototype.Dispose = function () {
|
|
9875
9910
|
if (this.disposed) {
|
|
9876
9911
|
return;
|
|
@@ -9885,22 +9920,162 @@ var RelationsRenderManager;
|
|
|
9885
9920
|
* @param params
|
|
9886
9921
|
*/
|
|
9887
9922
|
Manager.prototype.ReRender = function (params) {
|
|
9923
|
+
var _a;
|
|
9888
9924
|
return __awaiter(this, void 0, void 0, function () {
|
|
9889
|
-
var entityIds, force;
|
|
9890
|
-
return __generator(this, function (
|
|
9891
|
-
|
|
9892
|
-
|
|
9925
|
+
var entityIds, force, toReRender, toReRenderDataIds, regos, groups, _loop_2, i;
|
|
9926
|
+
return __generator(this, function (_b) {
|
|
9927
|
+
switch (_b.label) {
|
|
9928
|
+
case 0:
|
|
9929
|
+
entityIds = params.entityIds, force = params.force;
|
|
9930
|
+
toReRenderDataIds = [];
|
|
9931
|
+
if (entityIds == null) {
|
|
9932
|
+
toReRender = this.item.relations;
|
|
9933
|
+
}
|
|
9934
|
+
else {
|
|
9935
|
+
toReRender = [];
|
|
9936
|
+
regos = this.register.GetRegos({
|
|
9937
|
+
menuItemId: this.item.id
|
|
9938
|
+
});
|
|
9939
|
+
groups = this.item.relations;
|
|
9940
|
+
_loop_2 = function (i) {
|
|
9941
|
+
var group = groups[i];
|
|
9942
|
+
var toRenderEntityIds = [];
|
|
9943
|
+
if ((_a = group.entityIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
9944
|
+
for (var i_1 = 0; i_1 < group.entityIds.length; i_1++) {
|
|
9945
|
+
var groupEntityId = group.entityIds[i_1];
|
|
9946
|
+
// Primary ID matches a re-render entity ID.
|
|
9947
|
+
if (entityIds.includes(groupEntityId)) {
|
|
9948
|
+
toRenderEntityIds.push(groupEntityId);
|
|
9949
|
+
}
|
|
9950
|
+
}
|
|
9951
|
+
}
|
|
9952
|
+
var groupRegos = regos.filter(function (x) { var _a; return ((_a = x.relation) === null || _a === void 0 ? void 0 : _a["Relation.Type.ID"]) == group.relationTypeId; });
|
|
9953
|
+
if (groupRegos.length) {
|
|
9954
|
+
for (var i_2 = 0; i_2 < groupRegos.length; i_2++) {
|
|
9955
|
+
var rego = groupRegos[i_2];
|
|
9956
|
+
var dataEntityId = rego.entityId;
|
|
9957
|
+
// Data ID matches a re-render entity ID.
|
|
9958
|
+
if (dataEntityId && entityIds.includes(dataEntityId) && rego.relation) {
|
|
9959
|
+
// toRenderEntityIds.push(rego.relation["Principal.Entity.ID"]);
|
|
9960
|
+
toReRenderDataIds.push(dataEntityId);
|
|
9961
|
+
}
|
|
9962
|
+
}
|
|
9963
|
+
}
|
|
9964
|
+
if (toRenderEntityIds.length) {
|
|
9965
|
+
toReRender.push({
|
|
9966
|
+
relationTypeId: group.relationTypeId,
|
|
9967
|
+
entityIds: toRenderEntityIds
|
|
9968
|
+
});
|
|
9969
|
+
}
|
|
9970
|
+
};
|
|
9971
|
+
for (i = 0; i < groups.length; i++) {
|
|
9972
|
+
_loop_2(i);
|
|
9973
|
+
}
|
|
9974
|
+
}
|
|
9975
|
+
if (!toReRenderDataIds.length) return [3 /*break*/, 2];
|
|
9976
|
+
return [4 /*yield*/, this.queueRenderDataIds({
|
|
9977
|
+
dataEntityIds: toReRenderDataIds
|
|
9978
|
+
})];
|
|
9979
|
+
case 1:
|
|
9980
|
+
_b.sent();
|
|
9981
|
+
_b.label = 2;
|
|
9982
|
+
case 2:
|
|
9983
|
+
if (!toReRender.length) return [3 /*break*/, 4];
|
|
9984
|
+
return [4 /*yield*/, this.queueRenderRelations({
|
|
9985
|
+
relations: toReRender,
|
|
9986
|
+
force: true
|
|
9987
|
+
})];
|
|
9988
|
+
case 3:
|
|
9989
|
+
_b.sent();
|
|
9990
|
+
_b.label = 4;
|
|
9991
|
+
case 4: return [2 /*return*/];
|
|
9992
|
+
}
|
|
9893
9993
|
});
|
|
9894
9994
|
});
|
|
9895
9995
|
};
|
|
9896
|
-
Manager.prototype.
|
|
9996
|
+
Manager.prototype.queueRenderDataIds = function (params) {
|
|
9897
9997
|
return __awaiter(this, void 0, void 0, function () {
|
|
9898
|
-
var
|
|
9998
|
+
var dataEntityIds, i, data, e_1;
|
|
9899
9999
|
return __generator(this, function (_a) {
|
|
9900
10000
|
switch (_a.label) {
|
|
9901
10001
|
case 0:
|
|
9902
|
-
|
|
9903
|
-
|
|
10002
|
+
dataEntityIds = params.dataEntityIds;
|
|
10003
|
+
i = 0;
|
|
10004
|
+
_a.label = 1;
|
|
10005
|
+
case 1:
|
|
10006
|
+
if (!(i < dataEntityIds.length)) return [3 /*break*/, 6];
|
|
10007
|
+
_a.label = 2;
|
|
10008
|
+
case 2:
|
|
10009
|
+
_a.trys.push([2, 4, , 5]);
|
|
10010
|
+
return [4 /*yield*/, EntityRelation.GetByDataEntityId({
|
|
10011
|
+
entityId: dataEntityIds[i],
|
|
10012
|
+
api: this.apiGetter.getApi()
|
|
10013
|
+
})];
|
|
10014
|
+
case 3:
|
|
10015
|
+
data = _a.sent();
|
|
10016
|
+
if (data.relation) {
|
|
10017
|
+
if (this.shouldRenderRelation(data.relation)) {
|
|
10018
|
+
this.onGetterUpdate([data.relation]);
|
|
10019
|
+
}
|
|
10020
|
+
}
|
|
10021
|
+
return [3 /*break*/, 5];
|
|
10022
|
+
case 4:
|
|
10023
|
+
e_1 = _a.sent();
|
|
10024
|
+
console.error(e_1);
|
|
10025
|
+
return [3 /*break*/, 5];
|
|
10026
|
+
case 5:
|
|
10027
|
+
i++;
|
|
10028
|
+
return [3 /*break*/, 1];
|
|
10029
|
+
case 6: return [2 /*return*/];
|
|
10030
|
+
}
|
|
10031
|
+
});
|
|
10032
|
+
});
|
|
10033
|
+
};
|
|
10034
|
+
Manager.prototype.queueRenderRelations = function (params) {
|
|
10035
|
+
var _a;
|
|
10036
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10037
|
+
var relations, force, renderedState, toRender, _loop_3, i, allIds_1, _i, relations_1, relation, entityIds, i, entityId, data, toRender, j, relation, rego, e_2;
|
|
10038
|
+
return __generator(this, function (_b) {
|
|
10039
|
+
switch (_b.label) {
|
|
10040
|
+
case 0:
|
|
10041
|
+
_b.trys.push([0, 5, , 6]);
|
|
10042
|
+
relations = params.relations, force = params.force;
|
|
10043
|
+
if (force != true) {
|
|
10044
|
+
renderedState = this.getRenderedState();
|
|
10045
|
+
toRender = [];
|
|
10046
|
+
_loop_3 = function (i) {
|
|
10047
|
+
var typeId = relations[i].relationTypeId;
|
|
10048
|
+
var group = renderedState.find(function (x) { return x.relationTypeId == typeId; });
|
|
10049
|
+
if (!group || !((_a = group.entityIds) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
10050
|
+
toRender.push(relations[i]);
|
|
10051
|
+
return "continue";
|
|
10052
|
+
}
|
|
10053
|
+
var entityIds = relations[i].entityIds;
|
|
10054
|
+
if (!(entityIds === null || entityIds === void 0 ? void 0 : entityIds.length)) {
|
|
10055
|
+
return "continue";
|
|
10056
|
+
}
|
|
10057
|
+
var toRenderEntityIds = [];
|
|
10058
|
+
for (var j = 0; j < entityIds.length; j++) {
|
|
10059
|
+
var entityId = entityIds[j];
|
|
10060
|
+
if (!group.entityIds.includes(entityId) && !toRenderEntityIds.includes(entityId)) {
|
|
10061
|
+
toRenderEntityIds.push(entityId);
|
|
10062
|
+
}
|
|
10063
|
+
}
|
|
10064
|
+
if (toRenderEntityIds.length) {
|
|
10065
|
+
toRender.push({
|
|
10066
|
+
relationTypeId: typeId,
|
|
10067
|
+
entityIds: toRenderEntityIds
|
|
10068
|
+
});
|
|
10069
|
+
}
|
|
10070
|
+
};
|
|
10071
|
+
for (i = 0; i < relations.length; i++) {
|
|
10072
|
+
_loop_3(i);
|
|
10073
|
+
}
|
|
10074
|
+
if (!toRender.length) {
|
|
10075
|
+
return [2 /*return*/];
|
|
10076
|
+
}
|
|
10077
|
+
relations = toRender;
|
|
10078
|
+
}
|
|
9904
10079
|
allIds_1 = [];
|
|
9905
10080
|
for (_i = 0, relations_1 = relations; _i < relations_1.length; _i++) {
|
|
9906
10081
|
relation = relations_1[_i];
|
|
@@ -9910,9 +10085,8 @@ var RelationsRenderManager;
|
|
|
9910
10085
|
allIds_1 = allIds_1.filter(function (id, index) {
|
|
9911
10086
|
return allIds_1.indexOf(id) === index;
|
|
9912
10087
|
});
|
|
9913
|
-
toRender = [];
|
|
9914
10088
|
i = 0;
|
|
9915
|
-
|
|
10089
|
+
_b.label = 1;
|
|
9916
10090
|
case 1:
|
|
9917
10091
|
if (!(i < allIds_1.length)) return [3 /*break*/, 4];
|
|
9918
10092
|
entityId = allIds_1[i];
|
|
@@ -9925,50 +10099,37 @@ var RelationsRenderManager;
|
|
|
9925
10099
|
api: this.apiGetter.getApi()
|
|
9926
10100
|
})];
|
|
9927
10101
|
case 2:
|
|
9928
|
-
data =
|
|
9929
|
-
|
|
10102
|
+
data = _b.sent();
|
|
10103
|
+
if (this.disposed || this.viewer.isDestroyed()) {
|
|
10104
|
+
return [2 /*return*/];
|
|
10105
|
+
}
|
|
10106
|
+
toRender = [];
|
|
9930
10107
|
for (j = 0; j < data.relations.length; j++) {
|
|
9931
10108
|
relation = data.relations[j];
|
|
9932
10109
|
if (this.shouldRenderRelation(relation)) {
|
|
10110
|
+
if (force != true) {
|
|
10111
|
+
rego = this.register.GetRego({
|
|
10112
|
+
relation: relation,
|
|
10113
|
+
menuItemId: this.item.id
|
|
10114
|
+
});
|
|
10115
|
+
if (rego === null || rego === void 0 ? void 0 : rego.visual) {
|
|
10116
|
+
continue;
|
|
10117
|
+
}
|
|
10118
|
+
}
|
|
9933
10119
|
toRender.push(relation);
|
|
9934
10120
|
}
|
|
9935
10121
|
}
|
|
9936
|
-
_a.label = 3;
|
|
9937
|
-
case 3:
|
|
9938
|
-
i++;
|
|
9939
|
-
return [3 /*break*/, 1];
|
|
9940
|
-
case 4:
|
|
9941
|
-
console.log("all render", toRender);
|
|
9942
|
-
// Relations are not being returned??
|
|
9943
|
-
// const data = await Entity.GetListByIds({
|
|
9944
|
-
// entityIds: allIds,
|
|
9945
|
-
// expandRelations: true,
|
|
9946
|
-
// api: this.apiGetter.getApi()
|
|
9947
|
-
// });
|
|
9948
|
-
// for (let i = 0; i < data.entities.length; i++) {
|
|
9949
|
-
// const entity = data.entities[i];
|
|
9950
|
-
// if (entity?.Bruce?.relations?.length) {
|
|
9951
|
-
// const eRelations = entity.Bruce.relations;
|
|
9952
|
-
// for (let j = 0; j < eRelations.length; j++) {
|
|
9953
|
-
// const eRelation = eRelations[j];
|
|
9954
|
-
// const relation: EntityRelation.IRelation = {
|
|
9955
|
-
// "Principal.Entity.ID": entity.Bruce.ID,
|
|
9956
|
-
// "Related.Entity.ID": eRelation["Other.Entity.ID"],
|
|
9957
|
-
// "Relation.Type.ID": eRelation["Relation.Type.ID"]
|
|
9958
|
-
// };
|
|
9959
|
-
// if (this.shouldRenderRelation(relation)) {
|
|
9960
|
-
// toRender.push(relation);
|
|
9961
|
-
// }
|
|
9962
|
-
// }
|
|
9963
|
-
// }
|
|
9964
|
-
// }
|
|
9965
10122
|
if (toRender.length) {
|
|
9966
10123
|
this.onGetterUpdate(toRender);
|
|
9967
10124
|
}
|
|
9968
|
-
|
|
10125
|
+
_b.label = 3;
|
|
10126
|
+
case 3:
|
|
10127
|
+
i++;
|
|
10128
|
+
return [3 /*break*/, 1];
|
|
10129
|
+
case 4: return [3 /*break*/, 6];
|
|
9969
10130
|
case 5:
|
|
9970
|
-
|
|
9971
|
-
console.error(
|
|
10131
|
+
e_2 = _b.sent();
|
|
10132
|
+
console.error(e_2);
|
|
9972
10133
|
return [3 /*break*/, 6];
|
|
9973
10134
|
case 6: return [2 /*return*/];
|
|
9974
10135
|
}
|
|
@@ -9996,7 +10157,7 @@ var RelationsRenderManager;
|
|
|
9996
10157
|
Manager.prototype.onGetterUpdate = function (relations) {
|
|
9997
10158
|
var _a, _b;
|
|
9998
10159
|
return __awaiter(this, void 0, void 0, function () {
|
|
9999
|
-
var killCEntity, cEntities, key, i, relation, key, cEntity, visual,
|
|
10160
|
+
var killCEntity, cEntities, key, i, relation, rego, key, cEntity, visual, e_3;
|
|
10000
10161
|
var _this = this;
|
|
10001
10162
|
return __generator(this, function (_c) {
|
|
10002
10163
|
switch (_c.label) {
|
|
@@ -10031,6 +10192,19 @@ var RelationsRenderManager;
|
|
|
10031
10192
|
}
|
|
10032
10193
|
for (i = 0; i < relations.length; i++) {
|
|
10033
10194
|
relation = relations[i];
|
|
10195
|
+
rego = this.register.GetRego({
|
|
10196
|
+
menuItemId: this.item.id,
|
|
10197
|
+
relation: relation
|
|
10198
|
+
});
|
|
10199
|
+
if (rego) {
|
|
10200
|
+
this.register.RemoveRegos({
|
|
10201
|
+
entityId: rego.entityId,
|
|
10202
|
+
menuItemId: this.item.id,
|
|
10203
|
+
relation: relation,
|
|
10204
|
+
requestRender: false,
|
|
10205
|
+
doUpdate: true
|
|
10206
|
+
});
|
|
10207
|
+
}
|
|
10034
10208
|
key = RelationRenderEngine.GetRenderGroupId(relation);
|
|
10035
10209
|
cEntity = cEntities[key];
|
|
10036
10210
|
if (cEntity && this.shouldRenderRelation(relation)) {
|
|
@@ -10065,8 +10239,8 @@ var RelationsRenderManager;
|
|
|
10065
10239
|
this.viewer.scene.requestRender();
|
|
10066
10240
|
return [3 /*break*/, 3];
|
|
10067
10241
|
case 2:
|
|
10068
|
-
|
|
10069
|
-
console.error(
|
|
10242
|
+
e_3 = _c.sent();
|
|
10243
|
+
console.error(e_3);
|
|
10070
10244
|
return [3 /*break*/, 3];
|
|
10071
10245
|
case 3: return [2 /*return*/];
|
|
10072
10246
|
}
|
|
@@ -13244,7 +13418,7 @@ function renderLegacyNavigator(iteration, params, bookmark, view) {
|
|
|
13244
13418
|
function renderNavigator(iteration, params, bookmark, view) {
|
|
13245
13419
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
13246
13420
|
return __awaiter(this, void 0, void 0, function () {
|
|
13247
|
-
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, shouldBe2d, curIs2d, transition, pos, terrain, hillShades, baseColor, globeHidden, terrainWireframe, globeAlpha, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, selectedIds, hiddenIds, isolatedIds, labelledIds, curLabelledIds, toUnLabel, entityOpacityMap, entityId, opacity, imagery, legacyRelationIds, relations, curEnabled, newItemIds, _i, curEnabled_1, id, menuItem, gOcclusion;
|
|
13421
|
+
var viewer, scene, vSettings, bSettings, defaults, camera, newLens, shouldBe2d, curIs2d, transition, pos, terrain, hillShades, baseColor, globeHidden, terrainWireframe, globeAlpha, shadows, size, ambientOcclusion, AO, lighting, light, quality, fxaa, dateTime, clock, selectedIds, hiddenIds, isolatedIds, labelledIds, curLabelledIds, toUnLabel, entityOpacityMap, entityId, opacity, imagery, legacyRelationIds, relations, curEnabled, newItemIds, _i, curEnabled_1, id, shouldRemove, rendered, menuItem, menuItem, gOcclusion;
|
|
13248
13422
|
return __generator(this, function (_7) {
|
|
13249
13423
|
switch (_7.label) {
|
|
13250
13424
|
case 0:
|
|
@@ -13542,8 +13716,26 @@ function renderNavigator(iteration, params, bookmark, view) {
|
|
|
13542
13716
|
newItemIds = (_5 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _5 !== void 0 ? _5 : [];
|
|
13543
13717
|
for (_i = 0, curEnabled_1 = curEnabled; _i < curEnabled_1.length; _i++) {
|
|
13544
13718
|
id = curEnabled_1[_i];
|
|
13545
|
-
|
|
13546
|
-
|
|
13719
|
+
shouldRemove = void 0;
|
|
13720
|
+
if (id == RELATION_MENU_ITEM_ID) {
|
|
13721
|
+
rendered = params.manager.GetEnabledItem(id);
|
|
13722
|
+
shouldRemove = false;
|
|
13723
|
+
if (!legacyRelationIds.length && !relations.length) {
|
|
13724
|
+
shouldRemove = true;
|
|
13725
|
+
}
|
|
13726
|
+
// If we're about to render legacy relationships but a non-legacy item is currently enabled then we remove it.
|
|
13727
|
+
else if (legacyRelationIds.length && (rendered === null || rendered === void 0 ? void 0 : rendered.type) != MenuItem.EType.Relations) {
|
|
13728
|
+
shouldRemove = true;
|
|
13729
|
+
}
|
|
13730
|
+
// If we're about to render non-legacy relationships but a legacy item is currently enabled then we remove it.
|
|
13731
|
+
else if (relations.length && (rendered === null || rendered === void 0 ? void 0 : rendered.type) != MenuItem.EType.Relationships) {
|
|
13732
|
+
shouldRemove = true;
|
|
13733
|
+
}
|
|
13734
|
+
}
|
|
13735
|
+
else {
|
|
13736
|
+
shouldRemove = newItemIds.indexOf(id) === -1;
|
|
13737
|
+
}
|
|
13738
|
+
if (shouldRemove) {
|
|
13547
13739
|
params.manager.RemoveItemById({
|
|
13548
13740
|
menuItemId: id
|
|
13549
13741
|
});
|
|
@@ -13564,19 +13756,32 @@ function renderNavigator(iteration, params, bookmark, view) {
|
|
|
13564
13756
|
_7.label = 4;
|
|
13565
13757
|
case 4:
|
|
13566
13758
|
if (legacyRelationIds.length || relations.length) {
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13759
|
+
if (relations.length) {
|
|
13760
|
+
menuItem = {
|
|
13761
|
+
id: RELATION_MENU_ITEM_ID,
|
|
13762
|
+
Caption: "Entity relations",
|
|
13763
|
+
relations: relations,
|
|
13764
|
+
Type: MenuItem.EType.Relationships
|
|
13765
|
+
};
|
|
13766
|
+
params.manager.RenderItem({
|
|
13767
|
+
getters: params.getters,
|
|
13768
|
+
item: menuItem
|
|
13769
|
+
});
|
|
13770
|
+
}
|
|
13771
|
+
else if (legacyRelationIds.length) {
|
|
13772
|
+
menuItem = {
|
|
13773
|
+
id: RELATION_MENU_ITEM_ID,
|
|
13774
|
+
Caption: "Entity relations",
|
|
13775
|
+
BruceEntity: {
|
|
13776
|
+
EntityIds: legacyRelationIds
|
|
13777
|
+
},
|
|
13778
|
+
Type: MenuItem.EType.Relations
|
|
13779
|
+
};
|
|
13780
|
+
params.manager.RenderItem({
|
|
13781
|
+
getters: params.getters,
|
|
13782
|
+
item: menuItem
|
|
13783
|
+
});
|
|
13784
|
+
}
|
|
13580
13785
|
if (!assertIteration$1(params.viewer, iteration)) {
|
|
13581
13786
|
return [2 /*return*/];
|
|
13582
13787
|
}
|
|
@@ -16494,7 +16699,7 @@ var ViewerUtils;
|
|
|
16494
16699
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
16495
16700
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
16496
16701
|
|
|
16497
|
-
var VERSION$1 = "2.9.
|
|
16702
|
+
var VERSION$1 = "2.9.3";
|
|
16498
16703
|
|
|
16499
16704
|
export { VERSION$1 as VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, Draw3dPolygon, Draw3dPolyline };
|
|
16500
16705
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|