Skip to content

Commit

Permalink
show lanes error if missing back/forward with > 2 lanes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaligrafy committed Jan 28, 2024
1 parent 6df6a3f commit d891e4f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
6 changes: 2 additions & 4 deletions dist/iD.js
Original file line number Diff line number Diff line change
Expand Up @@ -90280,10 +90280,8 @@
}

/* validate lanes */
if (!isOneWay && hasLanes && lanes > 2 && lanes % 2 === 1) {
if (!hasLanesForward || !hasLanesBackward) {
classes.push('tag-lanes-error-count-lanes');
}
if (!isOneWay && hasLanes && lanes > 2 && (!hasLanesForward || !hasLanesBackward)) {
classes.push('tag-lanes-error-count-lanes');
}
if (hasLanesForward && hasLanesBackward && lanes !== lanesForward + lanesBackward) {
if (hasLanesBothWays && lanes !== lanesForward + lanesBackward + lanesBothWays) {
Expand Down
2 changes: 1 addition & 1 deletion dist/iD.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/iD.min.js

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions modules/svg/tag_classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,8 @@ export function svgTagClasses() {
}

/* validate lanes */
if (!isOneWay && hasLanes && lanes > 2 && lanes % 2 === 1) {
if (!hasLanesForward || !hasLanesBackward) {
classes.push('tag-lanes-error-count-lanes');
}
if (!isOneWay && hasLanes && lanes > 2 && (!hasLanesForward || !hasLanesBackward)) {
classes.push('tag-lanes-error-count-lanes');
}
if (hasLanesForward && hasLanesBackward && lanes !== lanesForward + lanesBackward) {
if (hasLanesBothWays && lanes !== lanesForward + lanesBackward + lanesBothWays) {
Expand Down

0 comments on commit d891e4f

Please sign in to comment.