Add option to delete all nogos to clear route dialog
This commit is contained in:
parent
ce32c0da71
commit
1a078ae630
1 changed files with 13 additions and 3 deletions
16
js/index.js
16
js/index.js
|
|
@ -74,12 +74,22 @@
|
|||
deleteButton = L.easyButton(
|
||||
'fa-trash-o',
|
||||
function () {
|
||||
bootbox.confirm({
|
||||
bootbox.prompt({
|
||||
size: 'small',
|
||||
message: "Delete route?",
|
||||
title: "Delete route?",
|
||||
inputType: 'checkbox',
|
||||
inputOptions: [
|
||||
{
|
||||
text: ' also delete all no-go areas',
|
||||
value: 'nogo'
|
||||
}
|
||||
],
|
||||
callback: function(result) {
|
||||
if (result) {
|
||||
if (result !== null) {
|
||||
routing.clear();
|
||||
if (result.length > 0 && result[0] === 'nogo') {
|
||||
nogos.clear();
|
||||
}
|
||||
onUpdate();
|
||||
urlHash.onMapMove();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue