mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
+1
-1
@@ -468,7 +468,7 @@ en:
|
||||
used_with: "used with {type}"
|
||||
validations:
|
||||
disconnected_highway: Disconnected highway
|
||||
disconnected_highway_tooltip: "Roads should be connected to other roads."
|
||||
disconnected_highway_tooltip: "Roads should be connected to other roads or building entrances."
|
||||
untagged_point: Untagged point
|
||||
untagged_line: Untagged line
|
||||
untagged_area: Untagged area
|
||||
|
||||
Vendored
+1
-1
@@ -578,7 +578,7 @@
|
||||
},
|
||||
"validations": {
|
||||
"disconnected_highway": "Disconnected highway",
|
||||
"disconnected_highway_tooltip": "Roads should be connected to other roads.",
|
||||
"disconnected_highway_tooltip": "Roads should be connected to other roads or building entrances.",
|
||||
"untagged_point": "Untagged point",
|
||||
"untagged_line": "Untagged line",
|
||||
"untagged_area": "Untagged area",
|
||||
|
||||
@@ -10,11 +10,15 @@ export function validationDisconnectedHighway() {
|
||||
|
||||
return graph.childNodes(entity)
|
||||
.every(function(vertex) {
|
||||
return graph.parentWays(vertex)
|
||||
.filter(function(parent) {
|
||||
return parent.tags.highway && parent !== entity;
|
||||
})
|
||||
.length === 0;
|
||||
var parents = graph.parentWays(vertex);
|
||||
if (parents.length === 1) { // standalone vertex
|
||||
return true;
|
||||
} else { // shared vertex
|
||||
return !vertex.tags.entrance &&
|
||||
parents.filter(function(parent) {
|
||||
return parent.tags.highway && parent !== entity;
|
||||
}).length === 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,7 +30,7 @@ export function validationDisconnectedHighway() {
|
||||
|
||||
if (isDisconnectedHighway(entity, graph)) {
|
||||
warnings.push({
|
||||
id: 'missing_tag',
|
||||
id: 'disconnected_highway',
|
||||
message: t('validations.disconnected_highway'),
|
||||
tooltip: t('validations.disconnected_highway_tooltip'),
|
||||
entity: entity
|
||||
|
||||
Reference in New Issue
Block a user