mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Only use no_u_turn restriction for angles < 5
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
// If `restriction` is not provided, it is automatically determined by the
|
||||
// angle of the turn:
|
||||
//
|
||||
// 0-23 degrees: no_u_turn
|
||||
// 23-158 degrees: no_right_turn
|
||||
// 0-5 degrees: no_u_turn
|
||||
// 5-158 degrees: no_right_turn
|
||||
// 158-202 degrees: no_straight_on
|
||||
// 202-326 degrees: no_left_turn
|
||||
// 336-360 degrees: no_u_turn
|
||||
// 202-355 degrees: no_left_turn
|
||||
// 355-360 degrees: no_u_turn
|
||||
//
|
||||
// If necessary, the `from` and `to` ways are split. In these cases, `from.node`
|
||||
// and `to.node` are used to determine which portion of the split ways become
|
||||
|
||||
@@ -127,13 +127,13 @@ iD.geo.inferRestriction = function(from, via, to, projection) {
|
||||
while (angle < 0)
|
||||
angle += 360;
|
||||
|
||||
if (angle < 23)
|
||||
if (angle < 5)
|
||||
return 'no_u_turn';
|
||||
if (angle < 158)
|
||||
return 'no_right_turn';
|
||||
if (angle < 202)
|
||||
return 'no_straight_on';
|
||||
if (angle < 336)
|
||||
if (angle < 355)
|
||||
return 'no_left_turn';
|
||||
|
||||
return 'no_u_turn';
|
||||
|
||||
Reference in New Issue
Block a user