Skip to content

Commit

Permalink
code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yle committed Feb 12, 2025
1 parent d9bbb00 commit f74a006
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@ en:
continue_from_end:
title: Continue drawing from end
tag_as_entrance:
title: Mark the endpoint as a {presetName}
title: Mark the endpoint as {presetName}
convert_to_line:
title: Convert this to a line
annotation: Converted an area to a line.
Expand Down
7 changes: 4 additions & 3 deletions modules/validations/disconnected_way.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,10 @@ export function validationDisconnectedWay() {
// ineligible for this fix
if (!isConnectedToBuilding) continue;

const entranceTags = highway.tags.highway in osmPathHighwayTagValues
? { entrance: 'yes' }
: { amenity: 'parking_entrance' };
// this autofix is only supported for paths
if (!(highway.tags.highway in osmPathHighwayTagValues)) continue;

const entranceTags = { entrance: 'yes' };

const presetName = presetManager.matchTags(entranceTags, 'vertex').name();

Expand Down
2 changes: 1 addition & 1 deletion test/spec/validations/disconnected_way.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('iD.validations.disconnected_way', function () {
});

describe.each([
['unclassified', { amenity: 'parking_entrance' }],
// ['unclassified', { amenity: 'parking_entrance' }],
['path', { entrance: 'yes' }]
])('highway=%s -> %s', (highway, entranceTags) => {
it('suggests adding an entrance node if the isolated highway network touches a building outline', () => {
Expand Down

0 comments on commit f74a006

Please sign in to comment.