Touch zoom interaction requests render frames
This commit is contained in:
@@ -76,6 +76,7 @@ ol.interaction.TouchZoom.prototype.handleTouchMove =
|
|||||||
var anchor = map.getCoordinateFromPixel(centroid);
|
var anchor = map.getCoordinateFromPixel(centroid);
|
||||||
|
|
||||||
// scale, bypass the resolution constraint
|
// scale, bypass the resolution constraint
|
||||||
|
map.requestRenderFrame();
|
||||||
ol.interaction.Interaction.zoomWithoutConstraints(
|
ol.interaction.Interaction.zoomWithoutConstraints(
|
||||||
map, view, view.getResolution() * scaleDelta, anchor);
|
map, view, view.getResolution() * scaleDelta, anchor);
|
||||||
|
|
||||||
@@ -110,9 +111,11 @@ ol.interaction.TouchZoom.prototype.handleTouchEnd =
|
|||||||
ol.interaction.TouchZoom.prototype.handleTouchStart =
|
ol.interaction.TouchZoom.prototype.handleTouchStart =
|
||||||
function(mapBrowserEvent) {
|
function(mapBrowserEvent) {
|
||||||
if (this.targetTouches.length >= 2) {
|
if (this.targetTouches.length >= 2) {
|
||||||
var view = mapBrowserEvent.map.getView();
|
var map = mapBrowserEvent.map;
|
||||||
|
var view = map.getView();
|
||||||
this.lastDistance_ = undefined;
|
this.lastDistance_ = undefined;
|
||||||
this.lastScaleDelta_ = 1;
|
this.lastScaleDelta_ = 1;
|
||||||
|
map.requestRenderFrame();
|
||||||
view.setHint(ol.ViewHint.INTERACTING, 1);
|
view.setHint(ol.ViewHint.INTERACTING, 1);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user