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.Measure = 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)
@@ -37,7 +35,6 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
* measurement sketch is modified. Listeners receive an event with measure,
* units, order, and geometry.
*/
EVENT_TYPES: ['measure', 'measurepartial'],
/**
* APIProperty: handlerOptions
@@ -120,11 +117,6 @@ OpenLayers.Control.Measure = OpenLayers.Class(OpenLayers.Control, {
* options - {Object}
*/
initialize: function(handler, options) {
// concatenate events specific to measure with those from the base
this.EVENT_TYPES =
OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(
OpenLayers.Control.prototype.EVENT_TYPES
);
OpenLayers.Control.prototype.initialize.apply(this, [options]);
var callbacks = {done: this.measureComplete,
point: this.measurePartial};