select features on "click" as opposed to on "mousedown" (closes #891)

thanks to all for the review and to crschmidt for updating the patch


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4241 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2007-09-12 14:25:34 +00:00
parent 446759fd65
commit 6f16455b1c
3 changed files with 161 additions and 6 deletions

View File

@@ -76,7 +76,7 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
initialize: function(layer, options) {
OpenLayers.Control.prototype.initialize.apply(this, [options]);
this.callbacks = OpenLayers.Util.extend({
down: this.downFeature,
click: this.clickFeature,
over: this.overFeature,
out: this.outFeature
}, this.callbacks);
@@ -85,13 +85,13 @@ OpenLayers.Control.SelectFeature = OpenLayers.Class(OpenLayers.Control, {
},
/**
* Method: downFeature
* Called when the feature handler detects a mouse-down on a feature
* Method: clickFeature
* Called when the feature handler detects a click on a feature
*
* Parameters:
* feature - {<OpenLayers.Vector.Feature>}
*/
downFeature: function(feature) {
clickFeature: function(feature) {
if(this.hover) {
return;
}