mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Only restriction along viaway can enter either at either end
(closes #4951) Previously it would only count if the connecting node was the first one. I guess I was only thinking about oneways only the day I wrote that code.
This commit is contained in:
@@ -529,8 +529,10 @@ export function osmIntersection(graph, startVertexId, maxDistance) {
|
||||
if (v.length === 1 && v[0].type === 'node') { // via node
|
||||
isOnlyVia = (v[0].id === nextNode.id);
|
||||
} else { // via way(s)
|
||||
for (k = 0; k < v.length; k++) {
|
||||
if (v[k].type === 'way' && vgraph.entity(v[k].id).first() === nextNode.id) {
|
||||
for (var i = 0; i < v.length; i++) {
|
||||
if (!v[i].type === 'way') continue;
|
||||
var viaWay = vgraph.entity(v[i].id);
|
||||
if (viaWay.first() === nextNode.id || viaWay.last() === nextNode.id) {
|
||||
isOnlyVia = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user