refactoring, type annotations

This commit is contained in:
tsauerwein
2014-02-19 11:58:56 +01:00
parent d772c95ccf
commit 7fbd11154b
8 changed files with 250 additions and 56 deletions

View File

@@ -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];