mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
optimize order of values of access fields (closes #8945)
This commit is contained in:
@@ -79,15 +79,23 @@ export function uiFieldAccess(field, context) {
|
||||
|
||||
|
||||
access.options = function(type) {
|
||||
var options = ['no', 'permissive', 'private', 'permit', 'destination', 'customers', 'unknown'];
|
||||
var options = [
|
||||
'yes',
|
||||
'no',
|
||||
'designated',
|
||||
'permissive',
|
||||
'destination',
|
||||
'customers',
|
||||
'private',
|
||||
'permit',
|
||||
'unknown'
|
||||
];
|
||||
|
||||
if (type !== 'access') {
|
||||
options.unshift('yes');
|
||||
options.push('designated');
|
||||
|
||||
if (type === 'bicycle') {
|
||||
options.push('dismount');
|
||||
}
|
||||
if (type === 'access') {
|
||||
options = options.filter(v => v !== 'yes' && v !== 'designated');
|
||||
}
|
||||
if (type === 'bicycle') {
|
||||
options.splice(options.length - 4, 0, 'dismount');
|
||||
}
|
||||
|
||||
return options.map(function(option) {
|
||||
|
||||
Reference in New Issue
Block a user