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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user