refactoring, type annotations
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
|
||||
goog.provide('ol.pointer.EventSource');
|
||||
|
||||
goog.require('goog.events.BrowserEvent');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -25,7 +27,8 @@ ol.pointer.EventSource.prototype.getEvents = goog.abstractMethod;
|
||||
/**
|
||||
* Returns a mapping between the supported event types and
|
||||
* the handlers that should handle an event.
|
||||
* @return {Object.<string, function(Event)>} Event/Handler mapping
|
||||
* @return {Object.<string, function(goog.events.BrowserEvent)>}
|
||||
* Event/Handler mapping
|
||||
*/
|
||||
ol.pointer.EventSource.prototype.getMapping = goog.abstractMethod;
|
||||
|
||||
@@ -33,7 +36,7 @@ ol.pointer.EventSource.prototype.getMapping = goog.abstractMethod;
|
||||
/**
|
||||
* Returns the handler that should handle a given event type.
|
||||
* @param {string} eventType
|
||||
* @return {function(Event)} Handler
|
||||
* @return {function(goog.events.BrowserEvent)} Handler
|
||||
*/
|
||||
ol.pointer.EventSource.prototype.getHandlerForEvent = function(eventType) {
|
||||
return this.getMapping()[eventType];
|
||||
|
||||
Reference in New Issue
Block a user