Events provides

This commit is contained in:
Tim Schaub
2016-08-11 21:21:49 -06:00
parent e0d05f7491
commit 59b0f9a658
3 changed files with 47 additions and 49 deletions

View File

@@ -0,0 +1,35 @@
goog.provide('ol.events.EventType');
/**
* @enum {string}
* @const
*/
ol.events.EventType = {
/**
* Generic change event. Triggered when the revision counter is increased.
* @event ol.events.Event#change
* @api
*/
CHANGE: 'change',
CLICK: 'click',
DBLCLICK: 'dblclick',
DRAGENTER: 'dragenter',
DRAGOVER: 'dragover',
DROP: 'drop',
ERROR: 'error',
KEYDOWN: 'keydown',
KEYPRESS: 'keypress',
LOAD: 'load',
MOUSEDOWN: 'mousedown',
MOUSEMOVE: 'mousemove',
MOUSEOUT: 'mouseout',
MOUSEUP: 'mouseup',
MOUSEWHEEL: 'mousewheel',
MSPOINTERDOWN: 'mspointerdown',
RESIZE: 'resize',
TOUCHSTART: 'touchstart',
TOUCHMOVE: 'touchmove',
TOUCHEND: 'touchend',
WHEEL: 'wheel'
};

View File

@@ -1,57 +1,8 @@
goog.provide('ol.events');
goog.provide('ol.events.EventType');
goog.provide('ol.events.KeyCode');
goog.require('ol.obj');
/**
* @enum {string}
* @const
*/
ol.events.EventType = {
/**
* Generic change event. Triggered when the revision counter is increased.
* @event ol.events.Event#change
* @api
*/
CHANGE: 'change',
CLICK: 'click',
DBLCLICK: 'dblclick',
DRAGENTER: 'dragenter',
DRAGOVER: 'dragover',
DROP: 'drop',
ERROR: 'error',
KEYDOWN: 'keydown',
KEYPRESS: 'keypress',
LOAD: 'load',
MOUSEDOWN: 'mousedown',
MOUSEMOVE: 'mousemove',
MOUSEOUT: 'mouseout',
MOUSEUP: 'mouseup',
MOUSEWHEEL: 'mousewheel',
MSPOINTERDOWN: 'mspointerdown',
RESIZE: 'resize',
TOUCHSTART: 'touchstart',
TOUCHMOVE: 'touchmove',
TOUCHEND: 'touchend',
WHEEL: 'wheel'
};
/**
* @enum {number}
* @const
*/
ol.events.KeyCode = {
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40
};
/**
* @param {ol.EventsKey} listenerObj Listener object.
* @return {ol.EventsListenerFunctionType} Bound listener.

12
src/ol/events/keycode.js Normal file
View File

@@ -0,0 +1,12 @@
goog.provide('ol.events.KeyCode');
/**
* @enum {number}
* @const
*/
ol.events.KeyCode = {
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40
};