SelectFeature stops selecting features after a right click on the map
This commit is contained in:
@@ -173,7 +173,13 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
|
||||
* evt - {Event}
|
||||
*/
|
||||
mousedown: function(evt) {
|
||||
this.down = evt.xy;
|
||||
// Feature selection is only done with a left click. Other handlers may stop the
|
||||
// propagation of left-click mousedown events but not right-click mousedown events.
|
||||
// This mismatch causes problems when comparing the location of the down and up
|
||||
// events in the click function so it is important ignore right-clicks.
|
||||
if (OpenLayers.Event.isLeftClick(evt) || OpenLayers.Event.isSingleTouch(evt)) {
|
||||
this.down = evt.xy;
|
||||
}
|
||||
return this.handle(evt) ? !this.stopDown : true;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user