Resolve constraints for View#animate() API calls
This commit is contained in:
@@ -111,7 +111,7 @@ export function pan(view, delta, opt_duration) {
|
||||
const currentCenter = view.getCenter();
|
||||
if (currentCenter) {
|
||||
const center = [currentCenter[0] + delta[0], currentCenter[1] + delta[1]];
|
||||
view.animate({
|
||||
view.animate_({
|
||||
duration: opt_duration !== undefined ? opt_duration : 250,
|
||||
easing: linear,
|
||||
center: view.getConstrainedCenter(center)
|
||||
@@ -135,7 +135,6 @@ export function zoomByDelta(view, delta, opt_anchor, opt_duration) {
|
||||
const newZoom = view.getConstrainedZoom(currentZoom + delta);
|
||||
const newResolution = view.getResolutionForZoom(newZoom);
|
||||
|
||||
view.resolveConstraints(0);
|
||||
if (view.getAnimating()) {
|
||||
view.cancelAnimations();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user