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: {
|
draw: {
|
||||||
enable: 68, // char code for 'd'
|
enable: 68, // char code for 'd'
|
||||||
disable: 27 // char code for 'ESC'
|
disable: 27 // char code for 'ESC'
|
||||||
}
|
},
|
||||||
|
reverse: 82 // char code for 'r'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -349,6 +350,8 @@ BR.Routing = L.Routing.extend({
|
||||||
this._draw.disable();
|
this._draw.disable();
|
||||||
} else if (e.keyCode === this.options.shortcut.draw.enable) {
|
} else if (e.keyCode === this.options.shortcut.draw.enable) {
|
||||||
this._draw.enable();
|
this._draw.enable();
|
||||||
|
} else if (e.keyCode === this.options.shortcut.reverse) {
|
||||||
|
this.reverse();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
"opacity-slider": "Set transparency of route track and markers\n(Hold M key to mute temporarily)",
|
"opacity-slider": "Set transparency of route track and markers\n(Hold M key to mute temporarily)",
|
||||||
"preview": "Preview",
|
"preview": "Preview",
|
||||||
"privacy": "Privacy",
|
"privacy": "Privacy",
|
||||||
"reverse-route": "Reverse route",
|
"reverse-route": "Reverse route (R key)",
|
||||||
"route-quality-altitude": "Altitude coding (C key to toggle)",
|
"route-quality-altitude": "Altitude coding (C key to toggle)",
|
||||||
"route-quality-cost": "Cost coding (C key to toggle)",
|
"route-quality-cost": "Cost coding (C key to toggle)",
|
||||||
"route-quality-incline": "Incline coding (C key to toggle)",
|
"route-quality-incline": "Incline coding (C key to toggle)",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue