bring back 'esc' to disable drawing (in addition to 'q')
This commit is contained in:
parent
928229530f
commit
2c5906ad7b
2 changed files with 10 additions and 1 deletions
|
|
@ -23,7 +23,7 @@
|
|||
<div id="header" class="hidden">
|
||||
<div class="title"><span class="title-name">BRouter web</span> <sup class="version">alpha2</sup></div>
|
||||
<div class="header-text">
|
||||
'q' to cancel drawing, 'd' to enable drawing<br>
|
||||
'esc' or 'q' to disable drawing, 'd' to enable drawing<br>
|
||||
Web client for <a href="http://brouter.de/brouter" target="_blank">BRouter</a> ·
|
||||
<a href="https://github.com/nrenner/brouter-web#readme" target="_blank">about</a> ·
|
||||
<a href="https://github.com/nrenner/brouter-web" target="_blank">GitHub</a> ·
|
||||
|
|
|
|||
|
|
@ -105,4 +105,13 @@ BR.Routing = L.Routing.extend({
|
|||
|
||||
return segments;
|
||||
}
|
||||
|
||||
// add 'esc' to disable drawing
|
||||
,_keyupListener: function (e) {
|
||||
if (e.keyCode === 27) {
|
||||
this._draw.disable();
|
||||
} else {
|
||||
L.Routing.prototype._keyupListener.call(this, e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue