Only set interacting hint when modifying the view
This commit is contained in:
@@ -6,7 +6,6 @@ goog.require('goog.functions');
|
||||
goog.require('ol.Coordinate');
|
||||
goog.require('ol.MapBrowserEvent');
|
||||
goog.require('ol.MapBrowserEvent.EventType');
|
||||
goog.require('ol.ViewHint');
|
||||
goog.require('ol.interaction.Interaction');
|
||||
|
||||
|
||||
@@ -26,13 +25,6 @@ ol.interaction.Drag = function() {
|
||||
*/
|
||||
this.dragging_ = false;
|
||||
|
||||
/**
|
||||
* Delta for INTERACTING view hint. Subclasses that do not want the
|
||||
* INTERACTING hint to be set should override this to 0.
|
||||
* @type {number}
|
||||
*/
|
||||
this.interactingHint = 1;
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
@@ -130,7 +122,6 @@ ol.interaction.Drag.prototype.handleMapBrowserEvent =
|
||||
goog.asserts.assertInstanceof(browserEvent, goog.events.BrowserEvent);
|
||||
this.deltaX = browserEvent.clientX - this.startX;
|
||||
this.deltaY = browserEvent.clientY - this.startY;
|
||||
view.setHint(ol.ViewHint.INTERACTING, -this.interactingHint);
|
||||
this.dragging_ = false;
|
||||
this.handleDragEnd(mapBrowserEvent);
|
||||
}
|
||||
@@ -146,7 +137,6 @@ ol.interaction.Drag.prototype.handleMapBrowserEvent =
|
||||
(mapBrowserEvent.getCoordinate());
|
||||
var handled = this.handleDragStart(mapBrowserEvent);
|
||||
if (handled) {
|
||||
view.setHint(ol.ViewHint.INTERACTING, this.interactingHint);
|
||||
this.dragging_ = true;
|
||||
mapBrowserEvent.preventDefault();
|
||||
stopEvent = true;
|
||||
|
||||
Reference in New Issue
Block a user