1
0
Fork 0

openstmap menu: move exit to top

master
Erik Andresen 2024-01-27 11:10:54 +01:00
parent 56b39fead9
commit c4631cfe5f
1 changed files with 2 additions and 1 deletions

View File

@ -172,6 +172,7 @@ function showMenu() {
var menu = { var menu = {
"":{title:/*LANG*/"Map"}, "":{title:/*LANG*/"Map"},
"< Back": ()=> showMap(), "< Back": ()=> showMap(),
/*LANG*/"Exit": () => load(),
}; };
// If we have a GPS fix, add a menu item to center it // If we have a GPS fix, add a menu item to center it
if (fix.fix) menu[/*LANG*/"Center GPS"]=() =>{ if (fix.fix) menu[/*LANG*/"Center GPS"]=() =>{
@ -179,6 +180,7 @@ function showMenu() {
m.lon = fix.lon; m.lon = fix.lon;
showMap(); showMap();
}; };
menu = Object.assign(menu, { menu = Object.assign(menu, {
/*LANG*/"Zoom In": () =>{ /*LANG*/"Zoom In": () =>{
m.scale /= 2; m.scale /= 2;
@ -232,7 +234,6 @@ function showMenu() {
} }
}; };
} }
menu[/*LANG*/"Exit"] = () => load();
E.showMenu(menu); E.showMenu(menu);
} }