mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
@@ -75,7 +75,11 @@ iD.presets.Preset = function(id, preset, fields) {
|
||||
tags = _.clone(tags);
|
||||
|
||||
for (var k in applyTags) {
|
||||
if (applyTags[k] !== '*') tags[k] = applyTags[k];
|
||||
if (applyTags[k] === '*') {
|
||||
tags[k] = 'yes';
|
||||
} else {
|
||||
tags[k] = applyTags[k];
|
||||
}
|
||||
}
|
||||
|
||||
for (var f in preset.fields) {
|
||||
|
||||
@@ -64,9 +64,9 @@ describe('iD.presets.Preset', function() {
|
||||
expect(preset.applyTags({}, 'area')).to.eql({highway: 'residential'});
|
||||
});
|
||||
|
||||
it("does not add wildcard tags", function() {
|
||||
it("adds wildcard tags with value 'yes'", function() {
|
||||
var preset = iD.presets.Preset('test', {tags: {building: '*'}});
|
||||
expect(preset.applyTags({}, 'area')).to.eql({});
|
||||
expect(preset.applyTags({}, 'area')).to.eql({building: 'yes'});
|
||||
});
|
||||
|
||||
it("adds default tags of fields with matching geometry", function() {
|
||||
|
||||
Reference in New Issue
Block a user