addPreRenderFunction calls requestRenderFrame
So there's no need to call requestRenderFrame prior to calling addPreRenderFunction.
This commit is contained in:
@@ -33,7 +33,6 @@ ol.interaction.Interaction.pan = function(
|
|||||||
var currentCenter = view.getCenter();
|
var currentCenter = view.getCenter();
|
||||||
if (goog.isDef(currentCenter)) {
|
if (goog.isDef(currentCenter)) {
|
||||||
if (goog.isDef(opt_duration)) {
|
if (goog.isDef(opt_duration)) {
|
||||||
map.requestRenderFrame();
|
|
||||||
map.addPreRenderFunction(ol.animation.pan({
|
map.addPreRenderFunction(ol.animation.pan({
|
||||||
source: currentCenter,
|
source: currentCenter,
|
||||||
duration: opt_duration,
|
duration: opt_duration,
|
||||||
@@ -74,7 +73,6 @@ ol.interaction.Interaction.rotateWithoutConstraints =
|
|||||||
var currentCenter = view.getCenter();
|
var currentCenter = view.getCenter();
|
||||||
if (goog.isDef(currentRotation) && goog.isDef(currentCenter) &&
|
if (goog.isDef(currentRotation) && goog.isDef(currentCenter) &&
|
||||||
goog.isDef(opt_duration)) {
|
goog.isDef(opt_duration)) {
|
||||||
map.requestRenderFrame();
|
|
||||||
map.addPreRenderFunction(ol.animation.rotate({
|
map.addPreRenderFunction(ol.animation.rotate({
|
||||||
rotation: currentRotation,
|
rotation: currentRotation,
|
||||||
duration: opt_duration,
|
duration: opt_duration,
|
||||||
@@ -154,7 +152,6 @@ ol.interaction.Interaction.zoomWithoutConstraints =
|
|||||||
var currentCenter = view.getCenter();
|
var currentCenter = view.getCenter();
|
||||||
if (goog.isDef(currentResolution) && goog.isDef(currentCenter) &&
|
if (goog.isDef(currentResolution) && goog.isDef(currentCenter) &&
|
||||||
goog.isDef(opt_duration)) {
|
goog.isDef(opt_duration)) {
|
||||||
map.requestRenderFrame();
|
|
||||||
map.addPreRenderFunction(ol.animation.zoom({
|
map.addPreRenderFunction(ol.animation.zoom({
|
||||||
resolution: currentResolution,
|
resolution: currentResolution,
|
||||||
duration: opt_duration,
|
duration: opt_duration,
|
||||||
|
|||||||
Reference in New Issue
Block a user