An event. What happens, when the event occurs, depends on which functions have been registered with the event.
// create a new Event var eventAfterMapRequest = new MapbenderEvent(); // register a function with that event eventAfterMapRequest.register(function () { ... }) // trigger the event eventAfterMapRequest.trigger();
http://www.mapbender.org/Christoph_Baudson
Copyright © 2009, Open Source Geospatial Foundation This program is dual licensed under the GNU General Public License and Simplified BSD license. http://svn.osgeo.org
Event | An event. |
Functions | |
Mapbender. | |
register | A function that needs to be executed, when the event occurs, has to be registered via this function. |
unregister | Exclude a previously registered function from the event permanently |
isRegistered | Checks if a function is already registered with this event. |
trigger | This function triggers the event. |
this.register = function( aFunction, scope )
A function that needs to be executed, when the event occurs, has to be registered via this function.
closure | a function (or a string for backwards compatibility) which is called (evaluated) when the trigger method is called. |
scope | [optional] if given, the function is not simply executed, but called with JavaScript’s call function |
func.call(scope, argumentObj)
this.trigger = function( properties, booleanOperator )
This function triggers the event.
properties | an object containing the arguments to be passed to the registered functions |
operator | [optional] a string that specifies how the return values of the individual registered functions shall be combined. Available operators are “AND”, “OR” and “CAT” (string concatenation). The default return value is the return value of the last registered function. |
var MapbenderEvent = Mapbender.Event = function ()
A function that needs to be executed, when the event occurs, has to be registered via this function.
this.register = function( aFunction, scope )
Exclude a previously registered function from the event permanently
this.unregister = function( aFunction )
Checks if a function is already registered with this event.
this.isRegistered = function ( aFunction )
This function triggers the event.
this.trigger = function( properties, booleanOperator )