Set panning hint in DragPanInteraction
This commit is contained in:
@@ -53,13 +53,25 @@ ol.interaction.DragPan.prototype.handleDrag = function(mapBrowserEvent) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.interaction.DragPan.prototype.handleDragEnd = function(mapBrowserEvent) {
|
||||||
|
var map = mapBrowserEvent.map;
|
||||||
|
map.requestRenderFrame();
|
||||||
|
map.getView().setHint(ol.ViewHint.PANNING, -1);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
|
ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
|
||||||
var browserEvent = mapBrowserEvent.browserEvent;
|
var browserEvent = mapBrowserEvent.browserEvent;
|
||||||
if (this.condition_(browserEvent)) {
|
if (this.condition_(browserEvent)) {
|
||||||
mapBrowserEvent.map.requestRenderFrame();
|
var map = mapBrowserEvent.map;
|
||||||
|
map.requestRenderFrame();
|
||||||
|
map.getView().setHint(ol.ViewHint.PANNING, 1);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user