Show members of selected relations even when their feature layer is otherwise hidden (close #6220)

This commit is contained in:
Quincy Morgan
2019-04-24 17:28:56 -07:00
parent 0b14acd24a
commit 6eeaf94076
+12 -1
View File
@@ -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); })