From 38914bc95b08d5590593b6f66e7d121c6969df11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 10 Apr 2013 15:15:27 +0200 Subject: [PATCH] addPreRenderFunction calls requestRenderFrame So there's no need to call requestRenderFrame prior to calling addPreRenderFunction. --- src/ol/interaction/interaction.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index 22d307ad99..11fa586d6b 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -33,7 +33,6 @@ ol.interaction.Interaction.pan = function( var currentCenter = view.getCenter(); if (goog.isDef(currentCenter)) { if (goog.isDef(opt_duration)) { - map.requestRenderFrame(); map.addPreRenderFunction(ol.animation.pan({ source: currentCenter, duration: opt_duration, @@ -74,7 +73,6 @@ ol.interaction.Interaction.rotateWithoutConstraints = var currentCenter = view.getCenter(); if (goog.isDef(currentRotation) && goog.isDef(currentCenter) && goog.isDef(opt_duration)) { - map.requestRenderFrame(); map.addPreRenderFunction(ol.animation.rotate({ rotation: currentRotation, duration: opt_duration, @@ -154,7 +152,6 @@ ol.interaction.Interaction.zoomWithoutConstraints = var currentCenter = view.getCenter(); if (goog.isDef(currentResolution) && goog.isDef(currentCenter) && goog.isDef(opt_duration)) { - map.requestRenderFrame(); map.addPreRenderFunction(ol.animation.zoom({ resolution: currentResolution, duration: opt_duration,