Fixed the scope of onSelect, onUnselect,... when scope is not specified.
r=crschmidt (pullup #2115) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9419 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -111,7 +111,7 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
* {Object} The scope to use with the onBeforeSelect, onSelect, onUnselect
|
||||
* callbacks. If null the scope will be this control.
|
||||
*/
|
||||
scope: this,
|
||||
scope: null,
|
||||
|
||||
/**
|
||||
* APIProperty: geometryTypes
|
||||
@@ -178,6 +178,10 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
OpenLayers.Control.prototype.EVENT_TYPES
|
||||
);
|
||||
OpenLayers.Control.prototype.initialize.apply(this, [options]);
|
||||
|
||||
if(this.scope === null) {
|
||||
this.scope = this;
|
||||
}
|
||||
if(layers instanceof Array) {
|
||||
this.layers = layers;
|
||||
this.layer = new OpenLayers.Layer.Vector.RootContainer(
|
||||
|
||||
Reference in New Issue
Block a user