mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Show members of selected relations even when their feature layer is otherwise hidden (close #6220)
This commit is contained in:
+12
-1
@@ -233,7 +233,18 @@ export function modeSelect(context, selectedIDs) {
|
||||
mode.enter = function() {
|
||||
if (!checkSelectedIDs()) return;
|
||||
|
||||
context.features().forceVisible(selectedIDs);
|
||||
var forceVisibleIDs = selectedIDs.slice();
|
||||
|
||||
selectedIDs.forEach(function(id) {
|
||||
var entity = context.entity(id);
|
||||
if (entity.type === 'relation') {
|
||||
forceVisibleIDs = forceVisibleIDs.concat(entity.members.map(function(member) {
|
||||
return member.id;
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
context.features().forceVisible(forceVisibleIDs);
|
||||
|
||||
var operations = Object.values(Operations)
|
||||
.map(function(o) { return o(selectedIDs, context); })
|
||||
|
||||
Reference in New Issue
Block a user