mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
oneway markers on rivers and streams
This commit is contained in:
@@ -622,6 +622,10 @@ text {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.oneway .textpath.tag-waterway {
|
||||
fill: #002F35;
|
||||
}
|
||||
|
||||
text.tag-oneway {
|
||||
fill:#91CFFF;
|
||||
stroke:#2C6B9B;
|
||||
|
||||
@@ -33,7 +33,9 @@ _.extend(iD.Way.prototype, {
|
||||
},
|
||||
|
||||
isOneWay: function() {
|
||||
return this.tags.oneway === 'yes';
|
||||
return this.tags.oneway === 'yes' ||
|
||||
this.tags.waterway === 'river' ||
|
||||
this.tags.waterway === 'stream';
|
||||
},
|
||||
|
||||
isClosed: function() {
|
||||
|
||||
@@ -105,8 +105,9 @@ iD.svg.Lines = function(projection) {
|
||||
var lines = [];
|
||||
|
||||
for (var i = 0; i < entities.length; i++) {
|
||||
var entity = entities[i], outer;
|
||||
if (outer = simpleMultipolygonOuterMember(entity, graph)) {
|
||||
var entity = entities[i],
|
||||
outer = simpleMultipolygonOuterMember(entity, graph);
|
||||
if (outer) {
|
||||
lines.push(entity.mergeTags(outer.tags));
|
||||
} else if (entity.geometry(graph) === 'line') {
|
||||
lines.push(entity);
|
||||
@@ -150,11 +151,14 @@ iD.svg.Lines = function(projection) {
|
||||
.filter(filter)
|
||||
.data(oneways, iD.Entity.key);
|
||||
|
||||
var tagClasses = iD.svg.TagClasses();
|
||||
|
||||
var tp = labels.enter()
|
||||
.append('text')
|
||||
.attr({ 'class': 'oneway', dy: 4 })
|
||||
.append('textPath')
|
||||
.attr('class', 'textpath');
|
||||
.attr('class', 'textpath')
|
||||
.call(tagClasses);
|
||||
|
||||
labels.exit().remove();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user