Use getAnimating and getInteracting from ol.View
This commit is contained in:
@@ -151,7 +151,7 @@ ol.interaction.DragPan.handleDownEvent_ = function(mapBrowserEvent) {
|
|||||||
view.setHint(ol.ViewHint.INTERACTING, 1);
|
view.setHint(ol.ViewHint.INTERACTING, 1);
|
||||||
}
|
}
|
||||||
// stop any current animation
|
// stop any current animation
|
||||||
if (view.getHints()[ol.ViewHint.ANIMATING]) {
|
if (view.getAnimating()) {
|
||||||
view.setCenter(mapBrowserEvent.frameState.viewState.center);
|
view.setCenter(mapBrowserEvent.frameState.viewState.center);
|
||||||
}
|
}
|
||||||
if (this.kinetic_) {
|
if (this.kinetic_) {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ goog.require('ol.CollectionEventType');
|
|||||||
goog.require('ol.Feature');
|
goog.require('ol.Feature');
|
||||||
goog.require('ol.MapBrowserEventType');
|
goog.require('ol.MapBrowserEventType');
|
||||||
goog.require('ol.MapBrowserPointerEvent');
|
goog.require('ol.MapBrowserPointerEvent');
|
||||||
goog.require('ol.ViewHint');
|
|
||||||
goog.require('ol.array');
|
goog.require('ol.array');
|
||||||
goog.require('ol.coordinate');
|
goog.require('ol.coordinate');
|
||||||
goog.require('ol.events');
|
goog.require('ol.events');
|
||||||
@@ -804,7 +803,7 @@ ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {
|
|||||||
this.lastPointerEvent_ = mapBrowserEvent;
|
this.lastPointerEvent_ = mapBrowserEvent;
|
||||||
|
|
||||||
var handled;
|
var handled;
|
||||||
if (!mapBrowserEvent.map.getView().getHints()[ol.ViewHint.INTERACTING] &&
|
if (!mapBrowserEvent.map.getView().getInteracting() &&
|
||||||
mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE &&
|
mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE &&
|
||||||
!this.handlingDownUpSequence) {
|
!this.handlingDownUpSequence) {
|
||||||
this.handlePointerMove_(mapBrowserEvent);
|
this.handlePointerMove_(mapBrowserEvent);
|
||||||
|
|||||||
Reference in New Issue
Block a user