From ea47581bae335ace9f117216c1882da8a26b4852 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Wed, 22 Nov 2023 16:39:47 +0100 Subject: [PATCH] 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_. --- CHANGELOG.md | 2 ++ modules/ui/fields/restrictions.js | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 162aeff30..5805b44ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/modules/ui/fields/restrictions.js b/modules/ui/fields/restrictions.js index fa9f7deca..bb63b2e42 100644 --- a/modules/ui/fields/restrictions.js +++ b/modules/ui/fields/restrictions.js @@ -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