From e761414a150745e93be17535ab6984cd840d5746 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 15 Oct 2014 00:40:22 -0400 Subject: [PATCH] 'Rail' feature filter should not match if it is also a highway. --- js/id/renderer/features.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/js/id/renderer/features.js b/js/id/renderer/features.js index a43f3e64c..1a87a683a 100644 --- a/js/id/renderer/features.js +++ b/js/id/renderer/features.js @@ -62,6 +62,8 @@ iD.Features = function(context) { dispatch.redraw(); } + + defineFeature('points', function(entity) { return entity.geometry(context.graph()) === 'point'; }, 100); @@ -115,7 +117,11 @@ iD.Features = function(context) { }); defineFeature('rail', function(entity) { - return ( + return !( + feature.major_roads.filter(entity) || + feature.minor_roads.filter(entity) || + feature.paths.filter(entity) + ) && ( !!entity.tags.railway || entity.tags.landuse === 'railway' ); @@ -128,10 +134,11 @@ iD.Features = function(context) { // contains a past/future tag, but not in active use as a road/path/cycleway/etc.. defineFeature('past_future', function(entity) { var strings = _.flatten(_.pairs(entity.tags)); - return _.any(strings, function(s) { return past_futures[s]; }) && - !feature.major_roads.filter(entity) && - !feature.minor_roads.filter(entity) && - !feature.paths.filter(entity); + return !( + feature.major_roads.filter(entity) || + feature.minor_roads.filter(entity) || + feature.paths.filter(entity) + ) && _.any(strings, function(s) { return past_futures[s]; }); }); // lines or areas that don't match another feature filter.