mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 08:17:30 +02:00
Render oneway arrows for junction=roundabout (fixes #1255)
This commit is contained in:
+2
-1
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user