mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-22 11:03:28 +00:00
2.x: Don't render multipolygon members in yellow when the multipolygon is selected (re: #6558, re: 4ab97128c4aae04b627cf8f19091c6c0fc1cf5bc)
This commit is contained in:
@@ -427,7 +427,7 @@ export function modeSelect(context, selectedIDs) {
|
||||
// Apply selection styling if not in wide selection
|
||||
|
||||
surface
|
||||
.selectAll(utilDeepMemberSelector(selectedIDs, context.graph()))
|
||||
.selectAll(utilDeepMemberSelector(selectedIDs, context.graph(), true /* skipMultipolgonMembers */))
|
||||
.classed('selected-member', true);
|
||||
surface
|
||||
.selectAll(utilEntityOrDeepMemberSelector(selectedIDs, context.graph()))
|
||||
|
||||
@@ -99,7 +99,7 @@ export function utilEntityAndDeepMemberIDs(ids, graph) {
|
||||
|
||||
// returns an selector to select entity ids for:
|
||||
// - deep descendant entityIDs for any of those entities that are relations
|
||||
export function utilDeepMemberSelector(ids, graph) {
|
||||
export function utilDeepMemberSelector(ids, graph, skipMultipolgonMembers) {
|
||||
var idsSet = new Set(ids);
|
||||
var seen = new Set();
|
||||
var returners = new Set();
|
||||
@@ -116,7 +116,7 @@ export function utilDeepMemberSelector(ids, graph) {
|
||||
|
||||
var entity = graph.hasEntity(id);
|
||||
if (!entity || entity.type !== 'relation') return;
|
||||
|
||||
if (skipMultipolgonMembers && entity.isMultipolygon()) return;
|
||||
entity.members
|
||||
.map(function(member) { return member.id; })
|
||||
.forEach(collectDeepDescendants); // recurse
|
||||
|
||||
Reference in New Issue
Block a user