From 05c659bdd792761e6e6b179977877e9cdeabbac1 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 5 Apr 2013 12:27:36 -0700 Subject: [PATCH] Render oneway arrows for junction=roundabout (fixes #1255) --- js/id/core/way.js | 3 ++- test/spec/core/way.js | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/js/id/core/way.js b/js/id/core/way.js index 9eb27650d..e17c51468 100644 --- a/js/id/core/way.js +++ b/js/id/core/way.js @@ -35,7 +35,8 @@ _.extend(iD.Way.prototype, { isOneWay: function() { return this.tags.oneway === 'yes' || this.tags.waterway === 'river' || - this.tags.waterway === 'stream'; + this.tags.waterway === 'stream' || + this.tags.junction === 'roundabout'; }, isClosed: function() { diff --git a/test/spec/core/way.js b/test/spec/core/way.js index 935d51dc4..2b0c244cd 100644 --- a/test/spec/core/way.js +++ b/test/spec/core/way.js @@ -84,6 +84,15 @@ describe('iD.Way', function() { it('returns true when the way has tag oneway=yes', function() { expect(iD.Way({tags: { oneway: 'yes' }}).isOneWay()).to.equal(true); }); + + it('returns true when the way has tag waterway=river or waterway=stream', function() { + expect(iD.Way({tags: { waterway: 'river' }}).isOneWay()).to.equal(true); + expect(iD.Way({tags: { waterway: 'stream' }}).isOneWay()).to.equal(true); + }); + + it('returns true when the way has tag junction=roundabout', function() { + expect(iD.Way({tags: { junction: 'roundabout' }}).isOneWay()).to.equal(true); + }); }); describe('#isArea', function() {