Rename addPreRenderFunction to beforeRender and remove the plural
This commit is contained in:
@@ -87,7 +87,7 @@ ol.interaction.DragPan.prototype.handleDragEnd = function(mapBrowserEvent) {
|
||||
var distance = this.kinetic_.getDistance();
|
||||
var angle = this.kinetic_.getAngle();
|
||||
this.kineticPreRenderFn_ = this.kinetic_.pan(view2DState.center);
|
||||
map.addPreRenderFunction(this.kineticPreRenderFn_);
|
||||
map.beforeRender(this.kineticPreRenderFn_);
|
||||
|
||||
var centerpx = map.getPixelFromCoordinate(view2DState.center);
|
||||
var dest = map.getCoordinateFromPixel([
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -87,7 +87,7 @@ ol.interaction.TouchPan.prototype.handleTouchEnd =
|
||||
var angle = this.kinetic_.getAngle();
|
||||
var center = view.getCenter();
|
||||
this.kineticPreRenderFn_ = this.kinetic_.pan(center);
|
||||
map.addPreRenderFunction(this.kineticPreRenderFn_);
|
||||
map.beforeRender(this.kineticPreRenderFn_);
|
||||
var centerpx = map.getPixelFromCoordinate(center);
|
||||
var dest = map.getCoordinateFromPixel([
|
||||
centerpx[0] - distance * Math.cos(angle),
|
||||
|
||||
Reference in New Issue
Block a user