mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Don't repurpose a node with interesting tags in crossing_ways fix
(closes #8326)
This commit is contained in:
@@ -719,10 +719,10 @@ export function validationCrossingWays(context) {
|
||||
|
||||
edges.forEach(function(edge) {
|
||||
var edgeNodes = [graph.entity(edge[0]), graph.entity(edge[1])];
|
||||
var closestNodeInfo = geoSphericalClosestNode(edgeNodes, loc);
|
||||
// if there is already a point nearby, use that
|
||||
if (closestNodeInfo.distance < mergeThresholdInMeters) {
|
||||
nodesToMerge.push(closestNodeInfo.node.id);
|
||||
var nearby = geoSphericalClosestNode(edgeNodes, loc);
|
||||
// if there is already a suitable node nearby, use that
|
||||
if (!nearby.node.hasInterestingTags() && nearby.distance < mergeThresholdInMeters) {
|
||||
nodesToMerge.push(nearby.node.id);
|
||||
// else add the new node to the way
|
||||
} else {
|
||||
graph = actionAddMidpoint({loc: loc, edge: edge}, node)(graph);
|
||||
|
||||
Reference in New Issue
Block a user