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:
Frédéric Junod
2011-09-17 19:09:40 +00:00
parent 67a5743d91
commit 501b42228a
25 changed files with 85 additions and 295 deletions
+2 -7
View File
@@ -58,9 +58,7 @@ OpenLayers.Layer = OpenLayers.Class({
alwaysInRange: 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)
* layer.events.register(type, obj, listener);
* (end)
@@ -89,8 +87,6 @@ OpenLayers.Layer = OpenLayers.Class({
* will receive an object with a *map* property referencing the map and
* a *layer* property referencing the layer.
*/
EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged",
"move", "moveend", "added", "removed"],
/**
* Constant: RESOLUTION_PROPERTIES
@@ -351,8 +347,7 @@ OpenLayers.Layer = OpenLayers.Class({
this.div.style.height = "100%";
this.div.dir = "ltr";
this.events = new OpenLayers.Events(this, this.div,
this.EVENT_TYPES);
this.events = new OpenLayers.Events(this, this.div);
if(this.eventListeners instanceof Object) {
this.events.on(this.eventListeners);
}