Only set interacting hint when modifying the view

This commit is contained in:
Tim Schaub
2013-11-14 14:21:01 -07:00
parent b2f17f9c62
commit b0362b8c0a
5 changed files with 9 additions and 11 deletions
-10
View File
@@ -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;