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
13
js/index.js
13
js/index.js
|
|
@ -94,18 +94,25 @@
|
||||||
function() {
|
function() {
|
||||||
bootbox.prompt({
|
bootbox.prompt({
|
||||||
size: 'small',
|
size: 'small',
|
||||||
title: i18next.t('map.delete-route'),
|
title: i18next.t('map.delete-route-nogos'),
|
||||||
inputType: 'checkbox',
|
inputType: 'checkbox',
|
||||||
inputOptions: [
|
inputOptions: [
|
||||||
|
{
|
||||||
|
text: i18next.t('map.delete-route'),
|
||||||
|
value: 'route'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text: i18next.t('map.delete-nogo-areas'),
|
text: i18next.t('map.delete-nogo-areas'),
|
||||||
value: 'nogo'
|
value: 'nogo'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
value: ['route'],
|
||||||
callback: function(result) {
|
callback: function(result) {
|
||||||
if (result !== null) {
|
if (result !== null) {
|
||||||
|
if (result.indexOf('route') !== -1) {
|
||||||
routing.clear();
|
routing.clear();
|
||||||
if (result.length > 0 && result[0] === 'nogo') {
|
}
|
||||||
|
if (result.indexOf('nogo') !== -1) {
|
||||||
nogos.clear();
|
nogos.clear();
|
||||||
}
|
}
|
||||||
onUpdate();
|
onUpdate();
|
||||||
|
|
@ -114,7 +121,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
i18next.t('map.clear-route')
|
i18next.t('map.delete-route-nogos')
|
||||||
);
|
);
|
||||||
|
|
||||||
function updateRoute(evt) {
|
function updateRoute(evt) {
|
||||||
|
|
|
||||||
|
|
@ -76,12 +76,12 @@
|
||||||
"map": {
|
"map": {
|
||||||
"attribution-osm-long": "OpenStreetMap contributors",
|
"attribution-osm-long": "OpenStreetMap contributors",
|
||||||
"attribution-osm-short": "OpenStreetMap",
|
"attribution-osm-short": "OpenStreetMap",
|
||||||
"clear-route": "Clear route",
|
|
||||||
"copyright": "Copyright",
|
"copyright": "Copyright",
|
||||||
"cycling": "Cycling",
|
"cycling": "Cycling",
|
||||||
"delete-last-point": "Delete last point",
|
"delete-last-point": "Delete last point",
|
||||||
"delete-nogo-areas": " also delete all no-go areas",
|
"delete-nogo-areas": "Delete all no-go areas",
|
||||||
"delete-route": "Delete route?",
|
"delete-route": "Delete route",
|
||||||
|
"delete-route-nogos": "Delete route and nogos",
|
||||||
"draw-route-start": "Draw route (D key)",
|
"draw-route-start": "Draw route (D key)",
|
||||||
"draw-route-stop": "Stop drawing route (ESC key)",
|
"draw-route-stop": "Stop drawing route (ESC key)",
|
||||||
"hikebike-hillshading": "Hillshading",
|
"hikebike-hillshading": "Hillshading",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue