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

@@ -18,9 +18,7 @@
OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
/**
* 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)
@@ -45,7 +43,6 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
* unsnap - Triggered when a vertex is unsnapped. Listeners receive an
* event with a *point* property.
*/
EVENT_TYPES: ["beforesnap", "snap", "unsnap"],
/**
* CONSTANT: DEFAULTS
@@ -175,10 +172,6 @@ OpenLayers.Control.Snapping = OpenLayers.Class(OpenLayers.Control, {
* no maximum resolution limit.
*/
initialize: function(options) {
// concatenate events specific to measure with those from the base
Array.prototype.push.apply(
this.EVENT_TYPES, OpenLayers.Control.prototype.EVENT_TYPES
);
OpenLayers.Control.prototype.initialize.apply(this, [options]);
this.options = options || {}; // TODO: this could be done by the super