-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* This provides methods used for event handling. It's not meant to | ||
* be used directly. | ||
* @mixin | ||
* @memberOf Geometry | ||
*/ | ||
var Eventful = { | ||
/** | ||
* Register a handler function to be called whenever this event is fired. | ||
* @param {string} eventName - Name of the event. | ||
* @param {function(Object)} handler - The handler to call. | ||
*/ | ||
on: function(eventName, handler) { | ||
// code... | ||
}, | ||
|
||
/** | ||
* Fire an event, causing all handlers for that event name to run. | ||
* @param {string} eventName - Name of the event. | ||
* @param {Object} eventData - The data provided to each handler. | ||
*/ | ||
fire: function(eventName, eventData) { | ||
// code... | ||
} | ||
}; |