pullup #2581 into the 2.9 branch

git-svn-id: http://svn.openlayers.org/branches/openlayers/2.9@10218 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2010-04-15 14:55:44 +00:00
parent 91752898e0
commit 12264fb33a

View File

@@ -59,8 +59,10 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
/** /**
* APIProperty: click * APIProperty: click
* {Boolean} Use a click handler for selecting/unselecting features. * {Boolean} Use a click handler for selecting/unselecting features. If
* Default is true. * both <click> and <box> are set to true, the click handler takes
* precedence over the box handler if a box with zero extent was
* selected. Default is true.
*/ */
click: true, click: true,
@@ -305,6 +307,10 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, {
); );
} else { } else {
if(this.click) {
// box without extent - let the click handler take care of it
return;
}
bounds = this.pixelToBounds(position); bounds = this.pixelToBounds(position);
} }
this.setModifiers(this.handlers.box.dragHandler.evt); this.setModifiers(this.handlers.box.dragHandler.evt);