mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-21 11:16:36 +02:00
optimize order of values of access fields (closes #8945)
This commit is contained in:
@@ -43,11 +43,15 @@ _Breaking developer changes, which may affect downstream projects or sites that
|
||||
|
||||
#### :newspaper: News
|
||||
* Drop legacy support for Internet Explorer 11 ([#8811])
|
||||
#### :rocket: Presets
|
||||
* Optimize order of values in dropdowns of `access` fields ([#8945])
|
||||
#### :hammer: Development
|
||||
* Switch build system to [esbuild](https://esbuild.github.io/) for much faster builds ([#8774], thanks [@ mbrzakovic] and [@bhousel])
|
||||
|
||||
[#8774]: https://github.com/openstreetmap/iD/pull/8774
|
||||
[#8811]: https://github.com/openstreetmap/iD/issues/8811
|
||||
[#8945]: https://github.com/openstreetmap/iD/issues/8945
|
||||
|
||||
|
||||
# 2.20.4
|
||||
##### 2022-Feb-03
|
||||
|
||||
@@ -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