mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Replace generic "tag-ephemeral" with specific "tag-status tag-status-xxx"
This commit is contained in:
17
css/map.css
17
css/map.css
@@ -346,10 +346,10 @@ path.fill.tag-landuse-landfill {
|
||||
.pattern-color-construction {
|
||||
fill: rgba(196, 189, 25, 0.2);
|
||||
}
|
||||
path.stroke.tag-landuse.tag-ephemeral {
|
||||
path.stroke.tag-landuse.tag-status {
|
||||
stroke: rgb(196, 189, 25);
|
||||
}
|
||||
.preset-icon-fill-area.tag-landuse.tag-ephemeral {
|
||||
.preset-icon-fill-area.tag-landuse.tag-status {
|
||||
border-color: rgb(196, 189, 25);
|
||||
background-color: rgba(196, 189, 25, 0.2);
|
||||
}
|
||||
@@ -1228,7 +1228,7 @@ path.shadow.tag-cutting {
|
||||
}
|
||||
|
||||
|
||||
/* surface - unpaved */
|
||||
/* Surface - unpaved */
|
||||
path.casing.tag-unpaved {
|
||||
stroke: #eaeaea;
|
||||
stroke-linecap: butt;
|
||||
@@ -1247,15 +1247,14 @@ path.casing.tag-bridge.tag-unpaved {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Ephemeral */
|
||||
path.stroke.tag-ephemeral,
|
||||
path.casing.tag-ephemeral {
|
||||
/* Status (e.g. construction, proposed, abandoned) */
|
||||
path.stroke.tag-status,
|
||||
path.casing.tag-status {
|
||||
stroke-linecap: butt;
|
||||
stroke-dasharray: 7, 3;
|
||||
}
|
||||
.low-zoom path.stroke.tag-ephemeral,
|
||||
.low-zoom path.casing.tag-ephemeral {
|
||||
.low-zoom path.stroke.tag-status,
|
||||
.low-zoom path.casing.tag-status {
|
||||
stroke-dasharray: 5, 2;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ iD.svg.TagClasses = function() {
|
||||
break;
|
||||
}
|
||||
|
||||
// add at most one ephemeral status tag, only if relates to primary tag..
|
||||
// add at most one status tag, only if relates to primary tag..
|
||||
if (!status) {
|
||||
for (i = 0; i < statuses.length; i++) {
|
||||
k = statuses[i];
|
||||
@@ -68,7 +68,7 @@ iD.svg.TagClasses = function() {
|
||||
}
|
||||
|
||||
if (status) {
|
||||
classes += ' tag-ephemeral';
|
||||
classes += ' tag-status tag-status-' + status;
|
||||
}
|
||||
|
||||
// add any secondary (structure) tags
|
||||
|
||||
@@ -33,35 +33,35 @@ describe("iD.svg.TagClasses", function () {
|
||||
expect(selection.attr('class')).to.equal('tag-highway tag-highway-primary');
|
||||
});
|
||||
|
||||
it('adds ephemeral status tag when status in primary value (`railway=abandoned`)', function() {
|
||||
it('adds status tag when status in primary value (`railway=abandoned`)', function() {
|
||||
selection
|
||||
.datum(iD.Entity({tags: {railway: 'abandoned'}}))
|
||||
.call(iD.svg.TagClasses());
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-ephemeral');
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-status tag-status-abandoned');
|
||||
});
|
||||
|
||||
it('adds ephemeral status tag when status in key and value matches "yes" (railway=rail + abandoned=yes)', function() {
|
||||
it('adds status tag when status in key and value matches "yes" (railway=rail + abandoned=yes)', function() {
|
||||
selection
|
||||
.datum(iD.Entity({tags: {railway: 'rail', abandoned: 'yes'}}))
|
||||
.call(iD.svg.TagClasses());
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-railway-rail tag-ephemeral');
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-railway-rail tag-status tag-status-abandoned');
|
||||
});
|
||||
|
||||
it('adds ephemeral status tag when status in key and value matches primary (railway=rail + abandoned=railway)', function() {
|
||||
it('adds status tag when status in key and value matches primary (railway=rail + abandoned=railway)', function() {
|
||||
selection
|
||||
.datum(iD.Entity({tags: {railway: 'rail', abandoned: 'railway'}}))
|
||||
.call(iD.svg.TagClasses());
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-railway-rail tag-ephemeral');
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-railway-rail tag-status tag-status-abandoned');
|
||||
});
|
||||
|
||||
it('adds primary and ephemeral status tag when status in key and no primary (abandoned=railway)', function() {
|
||||
it('adds primary and status tag when status in key and no primary (abandoned=railway)', function() {
|
||||
selection
|
||||
.datum(iD.Entity({tags: {abandoned: 'railway'}}))
|
||||
.call(iD.svg.TagClasses());
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-ephemeral');
|
||||
expect(selection.attr('class')).to.equal('tag-railway tag-status tag-status-abandoned');
|
||||
});
|
||||
|
||||
it('does not add ephemeral status tag for different primary tag (highway=path + abandoned=railway)', function() {
|
||||
it('does not add status tag for different primary tag (highway=path + abandoned=railway)', function() {
|
||||
selection
|
||||
.datum(iD.Entity({tags: {highway: 'path', abandoned: 'railway'}}))
|
||||
.call(iD.svg.TagClasses());
|
||||
|
||||
Reference in New Issue
Block a user