show turn restriction editor also when there is only one _to_ way, fixes #9983

as there might exist turn restrictions with that way as _via_.
This commit is contained in:
Martin Raifer
2023-11-22 16:39:47 +01:00
parent ac172a2b0e
commit ea47581bae
2 changed files with 3 additions and 3 deletions
+2
View File
@@ -45,6 +45,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :camera: Street-Level
#### :white_check_mark: Validation
#### :bug: Bugfixes
* Show turn restriction editor also when there is only one possible "to" way, as there might exist restrictions with that way as _via_ ([#9983])
#### :earth_asia: Localization
#### :hourglass: Performance
#### :mortar_board: Walkthrough / Help
@@ -52,6 +53,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
[#9424]: https://github.com/openstreetmap/iD/pull/9424
[#9422]: https://github.com/openstreetmap/iD/issues/9422
[#9983]: https://github.com/openstreetmap/iD/issues/9983
# 2.27.3
+1 -3
View File
@@ -53,9 +53,7 @@ export function uiFieldRestrictions(field, context) {
_intersection.vertices.length && // has vertices
_intersection.vertices // has the vertex that the user selected
.filter(function(vertex) { return vertex.id === _vertexID; }).length &&
_intersection.ways.length > 2 && // has more than 2 ways
_intersection.ways // has more than 1 TO way
.filter(function(way) { return way.__to; }).length > 1
_intersection.ways.length > 2 // has more than 2 ways
);
// Also hide in the case where