Don't flag unsquare buildings connected to building multipolygons

This commit is contained in:
Quincy Morgan
2019-05-09 18:06:40 -04:00
parent 58e6afd3ea
commit 7b441ab766
+6 -1
View File
@@ -43,7 +43,12 @@ export function validationUnsquareWay() {
var hasConnectedSquarableWays = nodes.some(function(node) {
return graph.parentWays(node).some(function(way) {
if (way.id === entity.id) return false;
return isBuilding(way, graph);
if (isBuilding(way, graph)) return true;
return graph.parentRelations(way).some(function(parentRelation) {
return parentRelation.isMultipolygon() &&
parentRelation.tags.building &&
parentRelation.tags.building !== 'no';
});
});
});
if (hasConnectedSquarableWays) return [];