mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Use different messages for crossing tunnels and bridges if they are connectable
This commit is contained in:
@@ -1192,8 +1192,12 @@ en:
|
||||
tip: Crossing waterways should be connected or use tunnels.
|
||||
tunnel-tunnel:
|
||||
tip: Crossing tunnels should use different layers.
|
||||
tunnel-tunnel_connectable:
|
||||
tip: Crossing tunnels should be connected or use different layers.
|
||||
bridge-bridge:
|
||||
tip: Crossing bridges should use different layers.
|
||||
bridge-bridge_connectable:
|
||||
tip: Crossing bridges should be connected or use different layers.
|
||||
highway_almost_junction:
|
||||
message: "{highway} is very close but not connected to {highway2}."
|
||||
tip: Intersecting highways should share a junction vertex.
|
||||
|
||||
6
dist/locales/en.json
vendored
6
dist/locales/en.json
vendored
@@ -1454,8 +1454,14 @@
|
||||
"tunnel-tunnel": {
|
||||
"tip": "Crossing tunnels should use different layers."
|
||||
},
|
||||
"tunnel-tunnel_connectable": {
|
||||
"tip": "Crossing tunnels should be connected or use different layers."
|
||||
},
|
||||
"bridge-bridge": {
|
||||
"tip": "Crossing bridges should use different layers."
|
||||
},
|
||||
"bridge-bridge_connectable": {
|
||||
"tip": "Crossing bridges should be connected or use different layers."
|
||||
}
|
||||
},
|
||||
"highway_almost_junction": {
|
||||
|
||||
@@ -283,12 +283,21 @@ export function validationHighwayCrossingOtherWays(context) {
|
||||
entities = _map(entities, function(way) {
|
||||
return getFeatureWithFeatureTypeTagsForWay(way, graph);
|
||||
});
|
||||
|
||||
var canConnect = canConnectEntities(entities[0], entities[1]);
|
||||
|
||||
var crossingTypeID;
|
||||
if (hasTag(entities[0].tags, 'tunnel') && hasTag(entities[1].tags, 'tunnel')) {
|
||||
crossingTypeID = 'tunnel-tunnel';
|
||||
if (canConnect) {
|
||||
crossingTypeID += '_connectable';
|
||||
}
|
||||
}
|
||||
else if (hasTag(entities[0].tags, 'bridge') && hasTag(entities[1].tags, 'bridge')) {
|
||||
crossingTypeID = 'bridge-bridge';
|
||||
if (canConnect) {
|
||||
crossingTypeID += '_connectable';
|
||||
}
|
||||
}
|
||||
else {
|
||||
crossingTypeID = crossing.featureTypes.sort().join('-');
|
||||
@@ -300,7 +309,7 @@ export function validationHighwayCrossingOtherWays(context) {
|
||||
};
|
||||
|
||||
var fixes = [];
|
||||
if (canConnectEntities(entities[0], entities[1])) {
|
||||
if (canConnect) {
|
||||
fixes.push(new validationIssueFix({
|
||||
title: t('issues.fix.add_connection_vertex.title'),
|
||||
onClick: function() {
|
||||
|
||||
Reference in New Issue
Block a user