Fetch the parent relations when downloading a single entity, e.g. when launching iD with a feature selected (close #6731)

This commit is contained in:
Quincy Morgan
2020-11-10 10:00:44 -05:00
parent 058676c0e1
commit 481b80e5cb
5 changed files with 34 additions and 7 deletions
+3
View File
@@ -177,10 +177,13 @@ export function coreContext() {
_deferred.add(handle);
};
// Download the full entity and its parent relations. The callback may be called multiple times.
context.loadEntity = (entityID, callback) => {
if (_connection) {
const cid = _connection.getConnectionId();
_connection.loadEntity(entityID, afterLoad(cid, callback));
// We need to fetch the parent relations separately.
_connection.loadEntityRelations(entityID, afterLoad(cid, callback));
}
};