Only pan the map when the mouse action button is pressed

This commit is contained in:
Frederic Junod
2013-06-18 16:53:03 +02:00
parent bf9b0b4dd2
commit 6adedacaf8

View File

@@ -106,7 +106,7 @@ ol.interaction.DragPan.prototype.handleDragEnd = function(mapBrowserEvent) {
*/
ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
var browserEvent = mapBrowserEvent.browserEvent;
if (this.condition_(browserEvent)) {
if (browserEvent.isMouseActionButton() && this.condition_(browserEvent)) {
if (this.kinetic_) {
this.kinetic_.begin();
this.kinetic_.update(browserEvent.clientX, browserEvent.clientY);