bruce-cesium 6.2.0 → 6.2.1

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.
@@ -18907,28 +18907,36 @@
18907
18907
  }
18908
18908
  }
18909
18909
  }
18910
- // Latest path.
18911
18910
  if (!rego.entityId) {
18911
+ // Latest path.
18912
18912
  const entityIdProp = this.featurePropCache.get("entityId");
18913
18913
  if (entityIdProp) {
18914
18914
  rego.entityId = feature.getProperty(entityIdProp);
18915
18915
  }
18916
- }
18917
- // Super legacy.
18918
- if (!rego.entityId) {
18919
- const brucePathProp = this.featurePropCache.get("brucePath");
18920
- if (brucePathProp) {
18921
- const pathStr = feature.getProperty(brucePathProp);
18922
- if (pathStr) {
18923
- let path = pathStr.split("|");
18924
- let entityTypeId = this.getEntityTypeByPath(path);
18925
- rego.entityTypeId = entityTypeId;
18926
- rego.entityId = path[path.length - 1];
18916
+ // Super legacy.
18917
+ if (!rego.entityId) {
18918
+ const brucePathProp = this.featurePropCache.get("brucePath");
18919
+ if (brucePathProp) {
18920
+ const pathStr = feature.getProperty(brucePathProp);
18921
+ if (pathStr) {
18922
+ let path = pathStr.split("|");
18923
+ let entityTypeId = this.getEntityTypeByPath(path);
18924
+ rego.entityTypeId = entityTypeId;
18925
+ rego.entityId = path[path.length - 1];
18926
+ }
18927
18927
  }
18928
18928
  }
18929
- }
18930
- if (!rego.entityId) {
18931
- return null;
18929
+ if (!rego.entityId) {
18930
+ return null;
18931
+ }
18932
+ const meta = this.getMetaByEntityId(rego.entityId);
18933
+ if (meta) {
18934
+ rego.entityTypeId = meta.typeId;
18935
+ rego.name = meta.name;
18936
+ rego.parentId = meta.parentId;
18937
+ // Might be a different ID due to collapsed parents.
18938
+ rego.entityId = meta.entityId;
18939
+ }
18932
18940
  }
18933
18941
  // Optional menu item restriction.
18934
18942
  // Allows only showing certain entities from a tileset.
@@ -18993,6 +19001,15 @@
18993
19001
  });
18994
19002
  return rego;
18995
19003
  }
19004
+ getMetaByEntityId(entityId) {
19005
+ if (this.treeNodeByEntityId == null) {
19006
+ if (!this.modelTree) {
19007
+ return null;
19008
+ }
19009
+ this.buildModelTreeNodes(this.modelTree);
19010
+ }
19011
+ return this.treeNodeByEntityId[entityId] || null;
19012
+ }
18996
19013
  getMetaByGeomId(geomId) {
18997
19014
  if (this.treeNodeByGeomId == null) {
18998
19015
  if (!this.modelTree) {
@@ -34200,7 +34217,7 @@
34200
34217
  }
34201
34218
  }
34202
34219
 
34203
- const VERSION = "6.2.0";
34220
+ const VERSION = "6.2.1";
34204
34221
 
34205
34222
  exports.VERSION = VERSION;
34206
34223
  exports.isOutlineChanged = isOutlineChanged;