bring back 'esc' to disable drawing (in addition to 'q')

This commit is contained in:
Norbert Renner 2014-08-22 10:57:30 +02:00
parent 928229530f
commit 2c5906ad7b
2 changed files with 10 additions and 1 deletions

View file

@ -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);
}
}
});