Rename addPreRenderFunction to beforeRender and remove the plural

This commit is contained in:
Tim Schaub
2013-09-03 10:57:31 -06:00
parent e83e0e1374
commit dc76b81780
9 changed files with 25 additions and 39 deletions

View File

@@ -38,7 +38,7 @@ ol.interaction.Interaction.pan = function(
var currentCenter = view.getCenter();
if (goog.isDef(currentCenter)) {
if (goog.isDef(opt_duration)) {
map.addPreRenderFunction(ol.animation.pan({
map.beforeRender(ol.animation.pan({
source: currentCenter,
duration: opt_duration,
easing: ol.easing.linear
@@ -78,13 +78,13 @@ ol.interaction.Interaction.rotateWithoutConstraints =
var currentCenter = view.getCenter();
if (goog.isDef(currentRotation) && goog.isDef(currentCenter) &&
goog.isDef(opt_duration)) {
map.addPreRenderFunction(ol.animation.rotate({
map.beforeRender(ol.animation.rotate({
rotation: currentRotation,
duration: opt_duration,
easing: ol.easing.easeOut
}));
if (goog.isDef(opt_anchor)) {
map.addPreRenderFunction(ol.animation.pan({
map.beforeRender(ol.animation.pan({
source: currentCenter,
duration: opt_duration,
easing: ol.easing.easeOut
@@ -157,13 +157,13 @@ ol.interaction.Interaction.zoomWithoutConstraints =
var currentCenter = view.getCenter();
if (goog.isDef(currentResolution) && goog.isDef(currentCenter) &&
goog.isDef(opt_duration)) {
map.addPreRenderFunction(ol.animation.zoom({
map.beforeRender(ol.animation.zoom({
resolution: currentResolution,
duration: opt_duration,
easing: ol.easing.easeOut
}));
if (goog.isDef(opt_anchor)) {
map.addPreRenderFunction(ol.animation.pan({
map.beforeRender(ol.animation.pan({
source: currentCenter,
duration: opt_duration,
easing: ol.easing.easeOut