mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-10-31 20:31:43 +08:00
Minor change
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user