bruce-cesium 2.9.1 → 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 +627 -136
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +625 -134
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/menu-item-creator.js.map +1 -1
- package/dist/lib/rendering/menu-item-manager.js +20 -0
- package/dist/lib/rendering/menu-item-manager.js.map +1 -1
- package/dist/lib/rendering/render-managers/other/old-relations-render-manager.js +351 -0
- package/dist/lib/rendering/render-managers/other/old-relations-render-manager.js.map +1 -0
- package/dist/lib/rendering/render-managers/other/relations-render-manager.js +256 -126
- package/dist/lib/rendering/render-managers/other/relations-render-manager.js.map +1 -1
- package/dist/lib/rendering/view-render-engine.js +75 -42
- package/dist/lib/rendering/view-render-engine.js.map +1 -1
- package/dist/lib/utils/view-utils.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/dist/types/rendering/render-managers/other/old-relations-render-manager.d.ts +60 -0
- package/dist/types/rendering/render-managers/other/relations-render-manager.d.ts +9 -12
- package/package.json +2 -2
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;
|
|
@@ -9819,6 +9819,535 @@ var TilesetArbRenderManager;
|
|
|
9819
9819
|
|
|
9820
9820
|
var RelationsRenderManager;
|
|
9821
9821
|
(function (RelationsRenderManager) {
|
|
9822
|
+
var Manager = /** @class */ (function () {
|
|
9823
|
+
function Manager(params) {
|
|
9824
|
+
// If true, this menu item is disposed and should not be used.
|
|
9825
|
+
// Any rendering will be ignored.
|
|
9826
|
+
this.disposed = false;
|
|
9827
|
+
var apiGetter = params.apiGetter, item = params.item, register = params.register, viewer = params.viewer;
|
|
9828
|
+
this.apiGetter = apiGetter;
|
|
9829
|
+
this.item = item;
|
|
9830
|
+
this.register = register;
|
|
9831
|
+
this.viewer = viewer;
|
|
9832
|
+
}
|
|
9833
|
+
Object.defineProperty(Manager.prototype, "Disposed", {
|
|
9834
|
+
get: function () {
|
|
9835
|
+
return this.disposed;
|
|
9836
|
+
},
|
|
9837
|
+
enumerable: false,
|
|
9838
|
+
configurable: true
|
|
9839
|
+
});
|
|
9840
|
+
/**
|
|
9841
|
+
* Starts rendering the menu item.
|
|
9842
|
+
* Re-call with an updated menu item to re-render. It will auto-cleanup old relations.
|
|
9843
|
+
* @param params
|
|
9844
|
+
* @returns
|
|
9845
|
+
*/
|
|
9846
|
+
Manager.prototype.Init = function (params) {
|
|
9847
|
+
if (this.disposed) {
|
|
9848
|
+
return;
|
|
9849
|
+
}
|
|
9850
|
+
if (params === null || params === void 0 ? void 0 : params.item) {
|
|
9851
|
+
this.item = params.item;
|
|
9852
|
+
}
|
|
9853
|
+
// Remove relationships we no longer want to render.
|
|
9854
|
+
// We'll have to get regos by the menu item ID then run a check on the related rego relationship.
|
|
9855
|
+
var regos = this.register.GetRegos({
|
|
9856
|
+
menuItemId: this.item.id
|
|
9857
|
+
});
|
|
9858
|
+
for (var i = 0; i < regos.length; i++) {
|
|
9859
|
+
var rego = regos[i];
|
|
9860
|
+
if (!this.shouldRenderRelation(rego.relation)) {
|
|
9861
|
+
this.register.RemoveRegos({
|
|
9862
|
+
relation: rego.relation,
|
|
9863
|
+
entityId: rego.entityId,
|
|
9864
|
+
menuItemId: this.item.id,
|
|
9865
|
+
requestRender: false
|
|
9866
|
+
});
|
|
9867
|
+
}
|
|
9868
|
+
}
|
|
9869
|
+
this.viewer.scene.requestRender();
|
|
9870
|
+
this.queueRenderRelations({
|
|
9871
|
+
relations: this.item.relations
|
|
9872
|
+
});
|
|
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
|
+
};
|
|
9909
|
+
Manager.prototype.Dispose = function () {
|
|
9910
|
+
if (this.disposed) {
|
|
9911
|
+
return;
|
|
9912
|
+
}
|
|
9913
|
+
this.disposed = true;
|
|
9914
|
+
this.register.RemoveRegos({
|
|
9915
|
+
menuItemId: this.item.id
|
|
9916
|
+
});
|
|
9917
|
+
};
|
|
9918
|
+
/**
|
|
9919
|
+
* Re-renders specific entity relationships.
|
|
9920
|
+
* @param params
|
|
9921
|
+
*/
|
|
9922
|
+
Manager.prototype.ReRender = function (params) {
|
|
9923
|
+
var _a;
|
|
9924
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
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
|
+
}
|
|
9993
|
+
});
|
|
9994
|
+
});
|
|
9995
|
+
};
|
|
9996
|
+
Manager.prototype.queueRenderDataIds = function (params) {
|
|
9997
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
9998
|
+
var dataEntityIds, i, data, e_1;
|
|
9999
|
+
return __generator(this, function (_a) {
|
|
10000
|
+
switch (_a.label) {
|
|
10001
|
+
case 0:
|
|
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
|
+
}
|
|
10079
|
+
allIds_1 = [];
|
|
10080
|
+
for (_i = 0, relations_1 = relations; _i < relations_1.length; _i++) {
|
|
10081
|
+
relation = relations_1[_i];
|
|
10082
|
+
entityIds = relation.entityIds;
|
|
10083
|
+
allIds_1.push.apply(allIds_1, entityIds);
|
|
10084
|
+
}
|
|
10085
|
+
allIds_1 = allIds_1.filter(function (id, index) {
|
|
10086
|
+
return allIds_1.indexOf(id) === index;
|
|
10087
|
+
});
|
|
10088
|
+
i = 0;
|
|
10089
|
+
_b.label = 1;
|
|
10090
|
+
case 1:
|
|
10091
|
+
if (!(i < allIds_1.length)) return [3 /*break*/, 4];
|
|
10092
|
+
entityId = allIds_1[i];
|
|
10093
|
+
return [4 /*yield*/, EntityRelation.GetList({
|
|
10094
|
+
entityId: entityId,
|
|
10095
|
+
filter: {
|
|
10096
|
+
oneWayOnly: true,
|
|
10097
|
+
loadEntityData: false
|
|
10098
|
+
},
|
|
10099
|
+
api: this.apiGetter.getApi()
|
|
10100
|
+
})];
|
|
10101
|
+
case 2:
|
|
10102
|
+
data = _b.sent();
|
|
10103
|
+
if (this.disposed || this.viewer.isDestroyed()) {
|
|
10104
|
+
return [2 /*return*/];
|
|
10105
|
+
}
|
|
10106
|
+
toRender = [];
|
|
10107
|
+
for (j = 0; j < data.relations.length; j++) {
|
|
10108
|
+
relation = data.relations[j];
|
|
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
|
+
}
|
|
10119
|
+
toRender.push(relation);
|
|
10120
|
+
}
|
|
10121
|
+
}
|
|
10122
|
+
if (toRender.length) {
|
|
10123
|
+
this.onGetterUpdate(toRender);
|
|
10124
|
+
}
|
|
10125
|
+
_b.label = 3;
|
|
10126
|
+
case 3:
|
|
10127
|
+
i++;
|
|
10128
|
+
return [3 /*break*/, 1];
|
|
10129
|
+
case 4: return [3 /*break*/, 6];
|
|
10130
|
+
case 5:
|
|
10131
|
+
e_2 = _b.sent();
|
|
10132
|
+
console.error(e_2);
|
|
10133
|
+
return [3 /*break*/, 6];
|
|
10134
|
+
case 6: return [2 /*return*/];
|
|
10135
|
+
}
|
|
10136
|
+
});
|
|
10137
|
+
});
|
|
10138
|
+
};
|
|
10139
|
+
Manager.prototype.shouldRenderRelation = function (relation) {
|
|
10140
|
+
var _a, _b;
|
|
10141
|
+
var typeId = relation === null || relation === void 0 ? void 0 : relation["Relation.Type.ID"];
|
|
10142
|
+
if (!typeId || !((_b = (_a = this.item) === null || _a === void 0 ? void 0 : _a.relations) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
10143
|
+
return false;
|
|
10144
|
+
}
|
|
10145
|
+
var group = this.item.relations.find(function (x) { return x.relationTypeId == typeId; });
|
|
10146
|
+
if (!(group === null || group === void 0 ? void 0 : group.entityIds)) {
|
|
10147
|
+
return false;
|
|
10148
|
+
}
|
|
10149
|
+
return group.entityIds.includes(relation["Principal.Entity.ID"]);
|
|
10150
|
+
};
|
|
10151
|
+
/**
|
|
10152
|
+
* Renders batch of entity relationships.
|
|
10153
|
+
* This will check if a relationship SHOULD be rendered before rendering it.
|
|
10154
|
+
* It will also handle already rendered relations to avoid re-rendering them.
|
|
10155
|
+
* @param relations
|
|
10156
|
+
*/
|
|
10157
|
+
Manager.prototype.onGetterUpdate = function (relations) {
|
|
10158
|
+
var _a, _b;
|
|
10159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10160
|
+
var killCEntity, cEntities, key, i, relation, rego, key, cEntity, visual, e_3;
|
|
10161
|
+
var _this = this;
|
|
10162
|
+
return __generator(this, function (_c) {
|
|
10163
|
+
switch (_c.label) {
|
|
10164
|
+
case 0:
|
|
10165
|
+
_c.trys.push([0, 2, , 3]);
|
|
10166
|
+
if (this.disposed || this.viewer.isDestroyed()) {
|
|
10167
|
+
return [2 /*return*/];
|
|
10168
|
+
}
|
|
10169
|
+
relations = relations.filter(function (x) { return _this.shouldRenderRelation(x); });
|
|
10170
|
+
killCEntity = function (cEntity) {
|
|
10171
|
+
if (cEntity && !_this.viewer.isDestroyed() && _this.viewer.entities.contains(cEntity)) {
|
|
10172
|
+
_this.viewer.entities.remove(cEntity);
|
|
10173
|
+
}
|
|
10174
|
+
};
|
|
10175
|
+
return [4 /*yield*/, RelationRenderEngine.Render({
|
|
10176
|
+
apiGetter: this.apiGetter,
|
|
10177
|
+
menuItemId: this.item.id,
|
|
10178
|
+
relations: relations,
|
|
10179
|
+
viewer: this.viewer,
|
|
10180
|
+
visualRegister: this.register
|
|
10181
|
+
})];
|
|
10182
|
+
case 1:
|
|
10183
|
+
cEntities = _c.sent();
|
|
10184
|
+
if (this.disposed) {
|
|
10185
|
+
this.register.RemoveRegos({
|
|
10186
|
+
menuItemId: this.item.id
|
|
10187
|
+
});
|
|
10188
|
+
for (key in cEntities) {
|
|
10189
|
+
killCEntity(cEntities[key]);
|
|
10190
|
+
}
|
|
10191
|
+
return [2 /*return*/];
|
|
10192
|
+
}
|
|
10193
|
+
for (i = 0; i < relations.length; i++) {
|
|
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
|
+
}
|
|
10208
|
+
key = RelationRenderEngine.GetRenderGroupId(relation);
|
|
10209
|
+
cEntity = cEntities[key];
|
|
10210
|
+
if (cEntity && this.shouldRenderRelation(relation)) {
|
|
10211
|
+
visual = (_a = this.register.GetRego({
|
|
10212
|
+
relation: relation,
|
|
10213
|
+
menuItemId: this.item.id
|
|
10214
|
+
})) === null || _a === void 0 ? void 0 : _a.visual;
|
|
10215
|
+
if (!visual || visual != cEntity) {
|
|
10216
|
+
this.register.AddRego({
|
|
10217
|
+
rego: {
|
|
10218
|
+
entityId: (_b = relation["Data.Entity.ID"]) !== null && _b !== void 0 ? _b : ObjectUtils.UId(),
|
|
10219
|
+
menuItemId: this.item.id,
|
|
10220
|
+
relation: relation,
|
|
10221
|
+
visual: cEntity,
|
|
10222
|
+
priority: 0,
|
|
10223
|
+
accountId: this.apiGetter.accountId
|
|
10224
|
+
},
|
|
10225
|
+
requestRender: false
|
|
10226
|
+
});
|
|
10227
|
+
}
|
|
10228
|
+
}
|
|
10229
|
+
else {
|
|
10230
|
+
this.register.RemoveRegos({
|
|
10231
|
+
entityId: relation["Data.Entity.ID"],
|
|
10232
|
+
relation: relation,
|
|
10233
|
+
menuItemId: this.item.id,
|
|
10234
|
+
requestRender: false
|
|
10235
|
+
});
|
|
10236
|
+
killCEntity(cEntity);
|
|
10237
|
+
}
|
|
10238
|
+
}
|
|
10239
|
+
this.viewer.scene.requestRender();
|
|
10240
|
+
return [3 /*break*/, 3];
|
|
10241
|
+
case 2:
|
|
10242
|
+
e_3 = _c.sent();
|
|
10243
|
+
console.error(e_3);
|
|
10244
|
+
return [3 /*break*/, 3];
|
|
10245
|
+
case 3: return [2 /*return*/];
|
|
10246
|
+
}
|
|
10247
|
+
});
|
|
10248
|
+
});
|
|
10249
|
+
};
|
|
10250
|
+
return Manager;
|
|
10251
|
+
}());
|
|
10252
|
+
RelationsRenderManager.Manager = Manager;
|
|
10253
|
+
})(RelationsRenderManager || (RelationsRenderManager = {}));
|
|
10254
|
+
|
|
10255
|
+
var TilesetGooglePhotosRenderManager;
|
|
10256
|
+
(function (TilesetGooglePhotosRenderManager) {
|
|
10257
|
+
var Manager = /** @class */ (function () {
|
|
10258
|
+
function Manager(params) {
|
|
10259
|
+
this.disposed = false;
|
|
10260
|
+
this.cTileset = null;
|
|
10261
|
+
var viewer = params.viewer, item = params.item;
|
|
10262
|
+
this.viewer = viewer;
|
|
10263
|
+
this.item = item;
|
|
10264
|
+
}
|
|
10265
|
+
Object.defineProperty(Manager.prototype, "Disposed", {
|
|
10266
|
+
get: function () {
|
|
10267
|
+
return this.disposed;
|
|
10268
|
+
},
|
|
10269
|
+
enumerable: false,
|
|
10270
|
+
configurable: true
|
|
10271
|
+
});
|
|
10272
|
+
Object.defineProperty(Manager.prototype, "Tileset", {
|
|
10273
|
+
get: function () {
|
|
10274
|
+
return this.cTileset;
|
|
10275
|
+
},
|
|
10276
|
+
enumerable: false,
|
|
10277
|
+
configurable: true
|
|
10278
|
+
});
|
|
10279
|
+
Manager.prototype.Dispose = function () {
|
|
10280
|
+
if (this.disposed) {
|
|
10281
|
+
return;
|
|
10282
|
+
}
|
|
10283
|
+
this.doDispose();
|
|
10284
|
+
};
|
|
10285
|
+
Manager.prototype.doDispose = function () {
|
|
10286
|
+
if (this.cTileset) {
|
|
10287
|
+
var viewer = this.viewer;
|
|
10288
|
+
if (!(viewer === null || viewer === void 0 ? void 0 : viewer.isDestroyed()) && this.viewer.scene.primitives.contains(this.cTileset)) {
|
|
10289
|
+
this.cTileset.show = false;
|
|
10290
|
+
this.viewer.scene.primitives.remove(this.cTileset);
|
|
10291
|
+
this.viewer.scene.requestRender();
|
|
10292
|
+
}
|
|
10293
|
+
this.cTileset = null;
|
|
10294
|
+
}
|
|
10295
|
+
};
|
|
10296
|
+
Manager.prototype.Init = function () {
|
|
10297
|
+
var _this = this;
|
|
10298
|
+
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
10299
|
+
var _a, colorCss;
|
|
10300
|
+
var _b, _c;
|
|
10301
|
+
return __generator(this, function (_d) {
|
|
10302
|
+
switch (_d.label) {
|
|
10303
|
+
case 0:
|
|
10304
|
+
// Using as any to be OK with older versions.
|
|
10305
|
+
_a = this;
|
|
10306
|
+
return [4 /*yield*/, ((_c = (_b = Cesium).createGooglePhotorealistic3DTileset) === null || _c === void 0 ? void 0 : _c.call(_b))];
|
|
10307
|
+
case 1:
|
|
10308
|
+
// Using as any to be OK with older versions.
|
|
10309
|
+
_a.cTileset = _d.sent();
|
|
10310
|
+
if (this.disposed) {
|
|
10311
|
+
this.doDispose();
|
|
10312
|
+
return [2 /*return*/];
|
|
10313
|
+
}
|
|
10314
|
+
this.viewer.scene.primitives.add(this.cTileset);
|
|
10315
|
+
colorCss = this.item.colorMask;
|
|
10316
|
+
if (colorCss) {
|
|
10317
|
+
this.cTileset.style = new Cesium3DTileStyle({
|
|
10318
|
+
color: {
|
|
10319
|
+
conditions: [
|
|
10320
|
+
["true", "color(\"".concat(colorCss, "\")")]
|
|
10321
|
+
]
|
|
10322
|
+
}
|
|
10323
|
+
});
|
|
10324
|
+
}
|
|
10325
|
+
this.viewer.scene.requestRender();
|
|
10326
|
+
return [2 /*return*/];
|
|
10327
|
+
}
|
|
10328
|
+
});
|
|
10329
|
+
}); })();
|
|
10330
|
+
};
|
|
10331
|
+
Manager.prototype.ReRender = function (params) {
|
|
10332
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
10333
|
+
var entityIds, force;
|
|
10334
|
+
return __generator(this, function (_a) {
|
|
10335
|
+
entityIds = params.entityIds, force = params.force;
|
|
10336
|
+
return [2 /*return*/];
|
|
10337
|
+
});
|
|
10338
|
+
});
|
|
10339
|
+
};
|
|
10340
|
+
return Manager;
|
|
10341
|
+
}());
|
|
10342
|
+
TilesetGooglePhotosRenderManager.Manager = Manager;
|
|
10343
|
+
})(TilesetGooglePhotosRenderManager || (TilesetGooglePhotosRenderManager = {}));
|
|
10344
|
+
|
|
10345
|
+
/**
|
|
10346
|
+
* Deprecated relations render manager.
|
|
10347
|
+
* This follows original navigator logic that renders both up/downstream relationships and ALL relationship types.
|
|
10348
|
+
*/
|
|
10349
|
+
var OldRelationsRenderManager;
|
|
10350
|
+
(function (OldRelationsRenderManager) {
|
|
9822
10351
|
var Manager = /** @class */ (function () {
|
|
9823
10352
|
function Manager(params) {
|
|
9824
10353
|
// If true, this menu item is disposed and should not be used.
|
|
@@ -10119,98 +10648,8 @@ var RelationsRenderManager;
|
|
|
10119
10648
|
};
|
|
10120
10649
|
return Manager;
|
|
10121
10650
|
}());
|
|
10122
|
-
|
|
10123
|
-
})(
|
|
10124
|
-
|
|
10125
|
-
var TilesetGooglePhotosRenderManager;
|
|
10126
|
-
(function (TilesetGooglePhotosRenderManager) {
|
|
10127
|
-
var Manager = /** @class */ (function () {
|
|
10128
|
-
function Manager(params) {
|
|
10129
|
-
this.disposed = false;
|
|
10130
|
-
this.cTileset = null;
|
|
10131
|
-
var viewer = params.viewer, item = params.item;
|
|
10132
|
-
this.viewer = viewer;
|
|
10133
|
-
this.item = item;
|
|
10134
|
-
}
|
|
10135
|
-
Object.defineProperty(Manager.prototype, "Disposed", {
|
|
10136
|
-
get: function () {
|
|
10137
|
-
return this.disposed;
|
|
10138
|
-
},
|
|
10139
|
-
enumerable: false,
|
|
10140
|
-
configurable: true
|
|
10141
|
-
});
|
|
10142
|
-
Object.defineProperty(Manager.prototype, "Tileset", {
|
|
10143
|
-
get: function () {
|
|
10144
|
-
return this.cTileset;
|
|
10145
|
-
},
|
|
10146
|
-
enumerable: false,
|
|
10147
|
-
configurable: true
|
|
10148
|
-
});
|
|
10149
|
-
Manager.prototype.Dispose = function () {
|
|
10150
|
-
if (this.disposed) {
|
|
10151
|
-
return;
|
|
10152
|
-
}
|
|
10153
|
-
this.doDispose();
|
|
10154
|
-
};
|
|
10155
|
-
Manager.prototype.doDispose = function () {
|
|
10156
|
-
if (this.cTileset) {
|
|
10157
|
-
var viewer = this.viewer;
|
|
10158
|
-
if (!(viewer === null || viewer === void 0 ? void 0 : viewer.isDestroyed()) && this.viewer.scene.primitives.contains(this.cTileset)) {
|
|
10159
|
-
this.cTileset.show = false;
|
|
10160
|
-
this.viewer.scene.primitives.remove(this.cTileset);
|
|
10161
|
-
this.viewer.scene.requestRender();
|
|
10162
|
-
}
|
|
10163
|
-
this.cTileset = null;
|
|
10164
|
-
}
|
|
10165
|
-
};
|
|
10166
|
-
Manager.prototype.Init = function () {
|
|
10167
|
-
var _this = this;
|
|
10168
|
-
(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
10169
|
-
var _a, colorCss;
|
|
10170
|
-
var _b, _c;
|
|
10171
|
-
return __generator(this, function (_d) {
|
|
10172
|
-
switch (_d.label) {
|
|
10173
|
-
case 0:
|
|
10174
|
-
// Using as any to be OK with older versions.
|
|
10175
|
-
_a = this;
|
|
10176
|
-
return [4 /*yield*/, ((_c = (_b = Cesium).createGooglePhotorealistic3DTileset) === null || _c === void 0 ? void 0 : _c.call(_b))];
|
|
10177
|
-
case 1:
|
|
10178
|
-
// Using as any to be OK with older versions.
|
|
10179
|
-
_a.cTileset = _d.sent();
|
|
10180
|
-
if (this.disposed) {
|
|
10181
|
-
this.doDispose();
|
|
10182
|
-
return [2 /*return*/];
|
|
10183
|
-
}
|
|
10184
|
-
this.viewer.scene.primitives.add(this.cTileset);
|
|
10185
|
-
colorCss = this.item.colorMask;
|
|
10186
|
-
if (colorCss) {
|
|
10187
|
-
this.cTileset.style = new Cesium3DTileStyle({
|
|
10188
|
-
color: {
|
|
10189
|
-
conditions: [
|
|
10190
|
-
["true", "color(\"".concat(colorCss, "\")")]
|
|
10191
|
-
]
|
|
10192
|
-
}
|
|
10193
|
-
});
|
|
10194
|
-
}
|
|
10195
|
-
this.viewer.scene.requestRender();
|
|
10196
|
-
return [2 /*return*/];
|
|
10197
|
-
}
|
|
10198
|
-
});
|
|
10199
|
-
}); })();
|
|
10200
|
-
};
|
|
10201
|
-
Manager.prototype.ReRender = function (params) {
|
|
10202
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
10203
|
-
var entityIds, force;
|
|
10204
|
-
return __generator(this, function (_a) {
|
|
10205
|
-
entityIds = params.entityIds, force = params.force;
|
|
10206
|
-
return [2 /*return*/];
|
|
10207
|
-
});
|
|
10208
|
-
});
|
|
10209
|
-
};
|
|
10210
|
-
return Manager;
|
|
10211
|
-
}());
|
|
10212
|
-
TilesetGooglePhotosRenderManager.Manager = Manager;
|
|
10213
|
-
})(TilesetGooglePhotosRenderManager || (TilesetGooglePhotosRenderManager = {}));
|
|
10651
|
+
OldRelationsRenderManager.Manager = Manager;
|
|
10652
|
+
})(OldRelationsRenderManager || (OldRelationsRenderManager = {}));
|
|
10214
10653
|
|
|
10215
10654
|
/**
|
|
10216
10655
|
* Utility to keep track of enabled menu items within a Cesium viewer.
|
|
@@ -10323,12 +10762,21 @@ var MenuItemManager;
|
|
|
10323
10762
|
}
|
|
10324
10763
|
// This means we're updating a rendered relationships menu item.
|
|
10325
10764
|
// Eg: different entities need to be rendered, or one of the relationship data entities changed.
|
|
10765
|
+
// Deprecated: this relationships item is dead and being phased out. Use 'relationships' one instead.
|
|
10326
10766
|
else if (rItem.type == MenuItem.EType.Relations && params.item.Type == MenuItem.EType.Relations) {
|
|
10327
10767
|
rItem.renderManager.Init({
|
|
10328
10768
|
item: params.item,
|
|
10329
10769
|
});
|
|
10330
10770
|
rItem.item = params.item;
|
|
10331
10771
|
}
|
|
10772
|
+
// This means we're updating a rendered relationships menu item.
|
|
10773
|
+
// Eg: different entities need to be rendered, or one of the relationship data entities changed.
|
|
10774
|
+
else if (rItem.type == MenuItem.EType.Relationships && params.item.Type == MenuItem.EType.Relationships) {
|
|
10775
|
+
rItem.renderManager.Init({
|
|
10776
|
+
item: params.item,
|
|
10777
|
+
});
|
|
10778
|
+
rItem.item = params.item;
|
|
10779
|
+
}
|
|
10332
10780
|
}
|
|
10333
10781
|
else {
|
|
10334
10782
|
rItem = {
|
|
@@ -10429,7 +10877,17 @@ var MenuItemManager;
|
|
|
10429
10877
|
register: this.visualsRegister
|
|
10430
10878
|
});
|
|
10431
10879
|
break;
|
|
10880
|
+
// Deprecated to support a few demos until new one is phased in.
|
|
10881
|
+
// Use Relationships instead.
|
|
10432
10882
|
case MenuItem.EType.Relations:
|
|
10883
|
+
rItem.renderManager = new OldRelationsRenderManager.Manager({
|
|
10884
|
+
apiGetter: params.apiGetter,
|
|
10885
|
+
item: params.item,
|
|
10886
|
+
register: this.visualsRegister,
|
|
10887
|
+
viewer: this.viewer
|
|
10888
|
+
});
|
|
10889
|
+
break;
|
|
10890
|
+
case MenuItem.EType.Relationships:
|
|
10433
10891
|
rItem.renderManager = new RelationsRenderManager.Manager({
|
|
10434
10892
|
apiGetter: params.apiGetter,
|
|
10435
10893
|
item: params.item,
|
|
@@ -12803,6 +13261,7 @@ function assertIteration$1(viewer, iteration) {
|
|
|
12803
13261
|
}
|
|
12804
13262
|
/**
|
|
12805
13263
|
* Renders DATA_VERSION = 1 navigator.
|
|
13264
|
+
* param iteration
|
|
12806
13265
|
* @param params
|
|
12807
13266
|
* @param bookmark
|
|
12808
13267
|
* @param view
|
|
@@ -12926,33 +13385,32 @@ function renderLegacyNavigator(iteration, params, bookmark, view) {
|
|
|
12926
13385
|
}
|
|
12927
13386
|
_f.label = 3;
|
|
12928
13387
|
case 3:
|
|
12929
|
-
if (
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12933
|
-
|
|
12934
|
-
|
|
12935
|
-
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
13388
|
+
if ((_e = bSettings === null || bSettings === void 0 ? void 0 : bSettings.drawnRelationEntityIDs) === null || _e === void 0 ? void 0 : _e.length) {
|
|
13389
|
+
menuItem = {
|
|
13390
|
+
id: RELATION_MENU_ITEM_ID,
|
|
13391
|
+
Caption: "Entity relations",
|
|
13392
|
+
BruceEntity: {
|
|
13393
|
+
EntityIds: bSettings.drawnRelationEntityIDs
|
|
13394
|
+
},
|
|
13395
|
+
Type: MenuItem.EType.Relations
|
|
13396
|
+
};
|
|
13397
|
+
params.manager.RenderItem({
|
|
12939
13398
|
apiGetter: params.apiGetter,
|
|
12940
13399
|
getters: params.getters,
|
|
12941
13400
|
item: menuItem
|
|
12942
|
-
})
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
return [2 /*return*/];
|
|
13401
|
+
});
|
|
13402
|
+
if (!assertIteration$1(params.viewer, iteration)) {
|
|
13403
|
+
return [2 /*return*/];
|
|
13404
|
+
}
|
|
12947
13405
|
}
|
|
12948
|
-
|
|
12949
|
-
case 5: return [2 /*return*/];
|
|
13406
|
+
return [2 /*return*/];
|
|
12950
13407
|
}
|
|
12951
13408
|
});
|
|
12952
13409
|
});
|
|
12953
13410
|
}
|
|
12954
13411
|
/**
|
|
12955
13412
|
* Renders DATA_VERSION > 1 navigator.
|
|
13413
|
+
* @param iteration
|
|
12956
13414
|
* @param params
|
|
12957
13415
|
* @param bookmark
|
|
12958
13416
|
* @param view
|
|
@@ -12960,7 +13418,7 @@ function renderLegacyNavigator(iteration, params, bookmark, view) {
|
|
|
12960
13418
|
function renderNavigator(iteration, params, bookmark, view) {
|
|
12961
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;
|
|
12962
13420
|
return __awaiter(this, void 0, void 0, function () {
|
|
12963
|
-
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,
|
|
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;
|
|
12964
13422
|
return __generator(this, function (_7) {
|
|
12965
13423
|
switch (_7.label) {
|
|
12966
13424
|
case 0:
|
|
@@ -13246,16 +13704,38 @@ function renderNavigator(iteration, params, bookmark, view) {
|
|
|
13246
13704
|
tiles: imagery,
|
|
13247
13705
|
viewer: params.manager.Viewer,
|
|
13248
13706
|
});
|
|
13249
|
-
|
|
13250
|
-
if (!
|
|
13251
|
-
|
|
13707
|
+
legacyRelationIds = bSettings === null || bSettings === void 0 ? void 0 : bSettings.renderedEntityRelations;
|
|
13708
|
+
if (!legacyRelationIds) {
|
|
13709
|
+
legacyRelationIds = [];
|
|
13710
|
+
}
|
|
13711
|
+
relations = bSettings === null || bSettings === void 0 ? void 0 : bSettings.renderedRelations;
|
|
13712
|
+
if (!relations) {
|
|
13713
|
+
relations = [];
|
|
13252
13714
|
}
|
|
13253
13715
|
curEnabled = params.manager.GetEnabledItemIds();
|
|
13254
13716
|
newItemIds = (_5 = bSettings === null || bSettings === void 0 ? void 0 : bSettings.menuItemIds) !== null && _5 !== void 0 ? _5 : [];
|
|
13255
13717
|
for (_i = 0, curEnabled_1 = curEnabled; _i < curEnabled_1.length; _i++) {
|
|
13256
13718
|
id = curEnabled_1[_i];
|
|
13257
|
-
|
|
13258
|
-
|
|
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) {
|
|
13259
13739
|
params.manager.RemoveItemById({
|
|
13260
13740
|
menuItemId: id
|
|
13261
13741
|
});
|
|
@@ -13275,26 +13755,37 @@ function renderNavigator(iteration, params, bookmark, view) {
|
|
|
13275
13755
|
}
|
|
13276
13756
|
_7.label = 4;
|
|
13277
13757
|
case 4:
|
|
13278
|
-
if (
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
}
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13758
|
+
if (legacyRelationIds.length || relations.length) {
|
|
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
|
+
}
|
|
13785
|
+
if (!assertIteration$1(params.viewer, iteration)) {
|
|
13786
|
+
return [2 /*return*/];
|
|
13787
|
+
}
|
|
13295
13788
|
}
|
|
13296
|
-
_7.label = 6;
|
|
13297
|
-
case 6:
|
|
13298
13789
|
gOcclusion = bSettings === null || bSettings === void 0 ? void 0 : bSettings.groundOcclusion;
|
|
13299
13790
|
if (gOcclusion == null) {
|
|
13300
13791
|
gOcclusion = (_6 = defaults === null || defaults === void 0 ? void 0 : defaults.settings) === null || _6 === void 0 ? void 0 : _6.groundOcclusion;
|
|
@@ -16208,7 +16699,7 @@ var ViewerUtils;
|
|
|
16208
16699
|
ViewerUtils.CreateWidgets = CreateWidgets;
|
|
16209
16700
|
})(ViewerUtils || (ViewerUtils = {}));
|
|
16210
16701
|
|
|
16211
|
-
var VERSION$1 = "2.9.
|
|
16702
|
+
var VERSION$1 = "2.9.3";
|
|
16212
16703
|
|
|
16213
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 };
|
|
16214
16705
|
//# sourceMappingURL=bruce-cesium.es5.js.map
|