Avoid barriers as well

This commit is contained in:
Tom MacWright
2012-12-14 14:25:14 -05:00
parent 3803d28d74
commit e9540bf281

View File

@@ -124,7 +124,12 @@ iD.Way.isClosed = function(d) {
iD.Way.isArea = function(d) {
return (d.tags.area && d.tags.area === 'yes') ||
(iD.Way.isClosed(d) &&
(!d.tags.area || d.tags.area === 'no') && !d.tags.highway);
// area-ness is disabled
(!d.tags.area || d.tags.area !== 'no') &&
// Tags that disable area-ness unless they are accompanied by
// area=yes
!d.tags.highway &&
!d.tags.barrier);
};
iD.Relation = function(attrs) {