addTags() -> setTags() / removeTags() -> unsetTags()

This avoids overriding the `addTags` and `removeTags` objects with functions
This commit is contained in:
Bryan Housel
2018-11-21 12:59:43 -05:00
parent ed1ffed095
commit ea9e3008a5
4 changed files with 36 additions and 36 deletions
+2 -2
View File
@@ -85,11 +85,11 @@ export function uiFieldLocalized(field, context) {
.on('accept', function(d) {
var tags = _entity.tags;
var geometry = _entity.geometry(context.graph());
var removed = preset.removeTags(tags, geometry);
var removed = preset.unsetTags(tags, geometry);
for (var k in tags) {
tags[k] = removed[k]; // set removed tags to `undefined`
}
tags = d.suggestion.applyTags(tags, geometry);
tags = d.suggestion.setTags(tags, geometry);
dispatch.call('change', this, tags);
})
);