diff --git a/js/id/presets.js b/js/id/presets.js index f71cf010e..152a080f9 100644 --- a/js/id/presets.js +++ b/js/id/presets.js @@ -5,9 +5,13 @@ iD.presets = function(context) { var other = iD.presets.Preset('other', { tags: {}, - geometry: ['point', 'vertex', 'line', 'area'] + geometry: ['point', 'vertex', 'line'] }), - all = iD.presets.Collection([other]), + otherarea = iD.presets.Preset('other/area', { + tags: { area: 'yes' }, + geometry: ['area'] + }), + all = iD.presets.Collection([other, otherarea]), defaults = { area: all, line: all, point: all, vertex: all }, fields = {}, universal = [], diff --git a/js/id/ui/tag_editor.js b/js/id/ui/tag_editor.js index d84cd0ece..4f081d1fd 100644 --- a/js/id/ui/tag_editor.js +++ b/js/id/ui/tag_editor.js @@ -13,18 +13,15 @@ iD.ui.TagEditor = function(context, entity) { selection_ = selection; var geometry = entity.geometry(context.graph()); + if (!preset) preset = presets.match(entity, context.graph()); + // preset was explicitly chosen if (newpreset) { - if (preset) { - tags = preset.removeTags(tags, geometry); - } + + tags = preset.removeTags(tags, geometry); newpreset.applyTags(tags, geometry); preset = newpreset; - - // find a preset that best fits - } else if (!preset) { - preset = presets.match(entity, context.graph()); } selection.html('');