This commit solves the following problem with the select feature control: if
you create two select feature controls on the same vector layer, one with hover:false that handles geometry type A only, and the other with hover:true that handles geometry type B only, then if you click on a geometry of type A and moves out of that geometry, the second control will unselect it. r=tschaub (closes #1221) git-svn-id: http://svn.openlayers.org/trunk/openlayers@5975 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -211,6 +211,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
|
||||
// in feature for the first time
|
||||
this.triggerCallback(type, 'in', [this.feature]);
|
||||
}
|
||||
this.lastFeature = this.feature;
|
||||
stopEvtPropag = true;
|
||||
} else {
|
||||
// not in to a feature
|
||||
@@ -219,7 +220,6 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
|
||||
this.triggerCallback(type, 'out', [this.lastFeature]);
|
||||
}
|
||||
}
|
||||
this.lastFeature = this.feature;
|
||||
} else {
|
||||
if(previouslyIn || (click && this.lastFeature)) {
|
||||
this.triggerCallback(type, 'out', [this.lastFeature]);
|
||||
|
||||
Reference in New Issue
Block a user