remove event type list from Events (lazy listener initialization) p=tschaub,me r=erilem (closes #2555)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -145,9 +145,7 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
events: null,
|
||||
|
||||
/**
|
||||
* Constant: EVENT_TYPES
|
||||
* {Array(String)} Supported application event types. Register a listener
|
||||
* for a particular event with the following syntax:
|
||||
* Register a listener for a particular event with the following syntax:
|
||||
* (code)
|
||||
* control.events.register(type, obj, listener);
|
||||
* (end)
|
||||
@@ -165,7 +163,6 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
* activate - Triggered when activated.
|
||||
* deactivate - Triggered when deactivated.
|
||||
*/
|
||||
EVENT_TYPES: ["activate", "deactivate"],
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Control
|
||||
@@ -187,7 +184,7 @@ OpenLayers.Control = OpenLayers.Class({
|
||||
|
||||
OpenLayers.Util.extend(this, options);
|
||||
|
||||
this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES);
|
||||
this.events = new OpenLayers.Events(this);
|
||||
if(this.eventListeners instanceof Object) {
|
||||
this.events.on(this.eventListeners);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user