diff --git a/assets/scripts/src/constants.js b/assets/scripts/src/constants.js index 1304598..413f490 100644 --- a/assets/scripts/src/constants.js +++ b/assets/scripts/src/constants.js @@ -3,7 +3,7 @@ export const OVERLAY_PADDING = 10; export const OVERLAY_ANIMATE = true; export const OVERLAY_ZINDEX = '999999999'; -export const ESC_KEYCODE = 27; +export const ESC_KEY_CODE = 27; export const ID_POPOVER = 'sholo-popover-item'; export const ID_OVERLAY = 'sholo-canvas-overlay'; diff --git a/assets/scripts/src/sholo.js b/assets/scripts/src/sholo.js index 0a73562..28f5490 100644 --- a/assets/scripts/src/sholo.js +++ b/assets/scripts/src/sholo.js @@ -2,7 +2,13 @@ import Overlay from './overlay'; import Element from './element'; import './polyfill'; import Popover from './popover'; -import { CLASS_CLOSE_BTN, CLASS_NEXT_STEP_BTN, CLASS_PREV_STEP_BTN, ESC_KEYCODE, ID_POPOVER } from './constants'; +import { + CLASS_CLOSE_BTN, + CLASS_NEXT_STEP_BTN, + CLASS_PREV_STEP_BTN, + ESC_KEY_CODE, + ID_POPOVER, +} from './constants'; /** * Plugin class that drives the plugin @@ -153,7 +159,7 @@ export default class Sholo { * @param event */ onKeyUp(event) { - if (event.keyCode === ESC_KEYCODE) { + if (event.keyCode === ESC_KEY_CODE) { this.overlay.clear(); } }