mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 03:36:37 +02:00
Merge pull request #4201 from openstreetmap/mandatory_names
Don't force the name field onto every object
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1086,6 +1086,7 @@
|
||||
"key": "name",
|
||||
"type": "localized",
|
||||
"label": "Name",
|
||||
"universal": true,
|
||||
"placeholder": "Common name (if any)"
|
||||
},
|
||||
"natural": {
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
"key": "name",
|
||||
"type": "localized",
|
||||
"label": "Name",
|
||||
"universal": true,
|
||||
"placeholder": "Common name (if any)"
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user