Merge pull request #4201 from openstreetmap/mandatory_names

Don't force the name field onto every object
This commit is contained in:
Bryan Housel
2017-08-01 13:18:29 -04:00
committed by GitHub
4 changed files with 7 additions and 5 deletions
+4
View File
@@ -1039,6 +1039,10 @@ button.save.has-count .count::before {
border-radius: 8px;
}
.inspector-preset .preset-form:empty {
display: none;
}
.entity-editor-pane .preset-list-item .preset-list-button-wrap {
margin-bottom: 0;
}
+1
View File
@@ -1086,6 +1086,7 @@
"key": "name",
"type": "localized",
"label": "Name",
"universal": true,
"placeholder": "Common name (if any)"
},
"natural": {
+1
View File
@@ -2,5 +2,6 @@
"key": "name",
"type": "localized",
"label": "Name",
"universal": true,
"placeholder": "Common name (if any)"
}
+1 -5
View File
@@ -40,7 +40,7 @@ export function uiPreset(context) {
field.show = show;
field.shown = function() {
return field.id === 'name' || field.show || _.some(field.keys, function(key) { return !!tags[key]; });
return field.show || _.some(field.keys, function(key) { return !!tags[key]; });
};
field.modified = function() {
@@ -105,10 +105,6 @@ export function uiPreset(context) {
fieldsArr = [];
if (presets.field('name')) {
fieldsArr.push(UIField(presets.field('name'), entity));
}
preset.fields.forEach(function(field) {
if (field.matchGeometry(geometry)) {
fieldsArr.push(UIField(field, entity, true));