Rename ol.ViewHint.PANNING to ol.ViewHint.INTERACTING
This commit is contained in:
@@ -80,7 +80,7 @@ ol.interaction.DragPan.prototype.handleDragEnd = function(mapBrowserEvent) {
|
||||
|
||||
var map = mapBrowserEvent.map;
|
||||
var view = map.getView();
|
||||
view.setHint(ol.ViewHint.PANNING, -1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, -1);
|
||||
|
||||
if (this.kinetic_ && this.kinetic_.end()) {
|
||||
var distance = this.kinetic_.getDistance();
|
||||
@@ -111,7 +111,7 @@ ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
|
||||
}
|
||||
var map = mapBrowserEvent.map;
|
||||
map.requestRenderFrame();
|
||||
map.getView().setHint(ol.ViewHint.PANNING, 1);
|
||||
map.getView().setHint(ol.ViewHint.INTERACTING, 1);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -73,7 +73,7 @@ ol.interaction.TouchPan.prototype.handleTouchEnd =
|
||||
var map = mapBrowserEvent.map;
|
||||
var view = map.getView();
|
||||
if (this.targetTouches.length == 0) {
|
||||
view.setHint(ol.ViewHint.PANNING, -1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, -1);
|
||||
if (this.kinetic_ && this.kinetic_.end()) {
|
||||
var distance = this.kinetic_.getDistance();
|
||||
var angle = this.kinetic_.getAngle();
|
||||
@@ -113,7 +113,7 @@ ol.interaction.TouchPan.prototype.handleTouchStart =
|
||||
if (this.kinetic_) {
|
||||
this.kinetic_.begin();
|
||||
}
|
||||
view.setHint(ol.ViewHint.PANNING, 1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, 1);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -103,7 +103,7 @@ ol.interaction.TouchRotate.prototype.handleTouchEnd =
|
||||
if (this.targetTouches.length < 2) {
|
||||
var map = mapBrowserEvent.map;
|
||||
var view = map.getView();
|
||||
view.setHint(ol.ViewHint.PANNING, -1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, -1);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@@ -121,7 +121,7 @@ ol.interaction.TouchRotate.prototype.handleTouchStart =
|
||||
this.lastAngle_ = undefined;
|
||||
this.rotating_ = false;
|
||||
this.rotationDelta_ = 0.0;
|
||||
view.setHint(ol.ViewHint.PANNING, 1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, 1);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -74,7 +74,7 @@ ol.interaction.TouchZoom.prototype.handleTouchEnd =
|
||||
var view = map.getView();
|
||||
// take the resolution constraint into account
|
||||
view.zoomToResolution(map, view.getResolution());
|
||||
view.setHint(ol.ViewHint.PANNING, -1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, -1);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@@ -90,7 +90,7 @@ ol.interaction.TouchZoom.prototype.handleTouchStart =
|
||||
if (this.targetTouches.length >= 2) {
|
||||
var view = mapBrowserEvent.map.getView();
|
||||
this.lastDistance_ = undefined;
|
||||
view.setHint(ol.ViewHint.PANNING, 1);
|
||||
view.setHint(ol.ViewHint.INTERACTING, 1);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user