Skip to content

Commit

Permalink
Fix typo event
Browse files Browse the repository at this point in the history
  • Loading branch information
llienher committed Nov 14, 2019
1 parent 084933c commit adb2adc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contribs/gmf/src/drawing/drawFeatureComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ exports.Controller_.prototype.handleMapClick_ = function(evt) {


exports.Controller_.prototype.handleCancelKeyEvent_ = function() {
olEvents.listen(document.body, 'keydown', (e) => {
olEvents.listen(document.body, 'keydown', (event) => {
const escPressed = event.keyCode === 27; // Escape key
if (!active.mousedown && escPressed && this.selectedFeature) {
this.selectedFeature = null;
Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/editing/editFeatureComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ exports.Controller_.prototype.handleMapClick_ = function(evt) {
const activeInteraction = interactions.find(interaction => interaction.getActive() === true);

if (this.cancelEventKey_ === undefined) {
this.cancelEventKey_ = olEvents.listen(document.body, 'keydown', (e) => {
this.cancelEventKey_ = olEvents.listen(document.body, 'keydown', (event) => {
const escPressed = event.keyCode === 27; // Escape key
if (!active.mousedown && escPressed && activeInteraction.getActive()) {
this.cancel();
Expand Down

0 comments on commit adb2adc

Please sign in to comment.