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

View File

@@ -36,9 +36,7 @@ OpenLayers.Map = OpenLayers.Class({
},
/**
* 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)
* map.events.register(type, obj, listener);
* (end)
@@ -85,13 +83,6 @@ OpenLayers.Map = OpenLayers.Class({
* - *mousemove* triggered after mousemove the map
* - *changebaselayer* triggered after the base layer changes
*/
EVENT_TYPES: [
"preaddlayer", "addlayer","preremovelayer", "removelayer",
"changelayer", "movestart",
"move", "moveend", "zoomend", "popupopen", "popupclose",
"addmarker", "removemarker", "clearmarkers", "mouseover",
"mouseout", "mousemove", "dragstart", "drag", "dragend",
"changebaselayer"],
/**
* Property: id
@@ -538,7 +529,7 @@ OpenLayers.Map = OpenLayers.Class({
this.viewPortDiv.appendChild(eventsDiv);
this.eventsDiv = eventsDiv;
this.events = new OpenLayers.Events(
this, this.eventsDiv, this.EVENT_TYPES, this.fallThrough,
this, this.eventsDiv, null, this.fallThrough,
{includeXY: true}
);