mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-30 11:49:39 +02:00
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:
@@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user