Render oneway arrows for junction=roundabout (fixes #1255)

This commit is contained in:
John Firebaugh
2013-04-05 12:27:36 -07:00
parent 042c085d14
commit 05c659bdd7
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -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() {
+9
View File
@@ -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() {