Add shortcut to reverse route
Press 'R' to swap start and end of the route.
This commit is contained in:
parent
37ab05310b
commit
2848e4dd36
2 changed files with 5 additions and 2 deletions
|
|
@ -28,7 +28,8 @@ BR.Routing = L.Routing.extend({
|
|||
draw: {
|
||||
enable: 68, // char code for 'd'
|
||||
disable: 27 // char code for 'ESC'
|
||||
}
|
||||
},
|
||||
reverse: 82 // char code for 'r'
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -349,6 +350,8 @@ BR.Routing = L.Routing.extend({
|
|||
this._draw.disable();
|
||||
} else if (e.keyCode === this.options.shortcut.draw.enable) {
|
||||
this._draw.enable();
|
||||
} else if (e.keyCode === this.options.shortcut.reverse) {
|
||||
this.reverse();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue