Remove area=yes when choosing an area preset (fixes #1684)

This commit is contained in:
John Firebaugh
2013-08-15 12:08:46 -07:00
parent 1386f4beb7
commit 548760529c
3 changed files with 8 additions and 3 deletions

View File

@@ -1157,7 +1157,9 @@
},
"area": {
"name": "Area",
"tags": {},
"tags": {
"area": "yes"
},
"geometry": [
"area"
]

View File

@@ -1,5 +1,7 @@
{
"name": "Area",
"tags": {},
"tags": {
"area": "yes"
},
"geometry": ["area"]
}

View File

@@ -16,7 +16,7 @@ iD.ui.PresetList = function(context) {
var message = messagewrap.append('h3')
.text(t('inspector.choose'));
if (currentPreset) {
if (context.entity(id).isUsed(context.graph())) {
messagewrap.append('button')
.attr('class', 'preset-choose')
.on('click', function() { event.choose(currentPreset); })
@@ -226,6 +226,7 @@ iD.ui.PresetList = function(context) {
presetList.entityID = function(_) {
if (!arguments.length) return id;
id = _;
presetList.preset(context.presets().match(context.entity(id), context.graph()));
return presetList;
};