Merge pull request #224 from Phyks/issue-217
Let user delete route and/or nogo areas
This commit is contained in:
commit
88d17089c3
2 changed files with 14 additions and 7 deletions
15
js/index.js
15
js/index.js
|
|
@ -94,18 +94,25 @@
|
|||
function() {
|
||||
bootbox.prompt({
|
||||
size: 'small',
|
||||
title: i18next.t('map.delete-route'),
|
||||
title: i18next.t('map.delete-route-nogos'),
|
||||
inputType: 'checkbox',
|
||||
inputOptions: [
|
||||
{
|
||||
text: i18next.t('map.delete-route'),
|
||||
value: 'route'
|
||||
},
|
||||
{
|
||||
text: i18next.t('map.delete-nogo-areas'),
|
||||
value: 'nogo'
|
||||
}
|
||||
],
|
||||
value: ['route'],
|
||||
callback: function(result) {
|
||||
if (result !== null) {
|
||||
routing.clear();
|
||||
if (result.length > 0 && result[0] === 'nogo') {
|
||||
if (result.indexOf('route') !== -1) {
|
||||
routing.clear();
|
||||
}
|
||||
if (result.indexOf('nogo') !== -1) {
|
||||
nogos.clear();
|
||||
}
|
||||
onUpdate();
|
||||
|
|
@ -114,7 +121,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
i18next.t('map.clear-route')
|
||||
i18next.t('map.delete-route-nogos')
|
||||
);
|
||||
|
||||
function updateRoute(evt) {
|
||||
|
|
|
|||
|
|
@ -76,12 +76,12 @@
|
|||
"map": {
|
||||
"attribution-osm-long": "OpenStreetMap contributors",
|
||||
"attribution-osm-short": "OpenStreetMap",
|
||||
"clear-route": "Clear route",
|
||||
"copyright": "Copyright",
|
||||
"cycling": "Cycling",
|
||||
"delete-last-point": "Delete last point",
|
||||
"delete-nogo-areas": " also delete all no-go areas",
|
||||
"delete-route": "Delete route?",
|
||||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-route": "Delete route",
|
||||
"delete-route-nogos": "Delete route and nogos",
|
||||
"draw-route-start": "Draw route (D key)",
|
||||
"draw-route-stop": "Stop drawing route (ESC key)",
|
||||
"hikebike-hillshading": "Hillshading",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue