View / add getValidCenter method to improve interactions
The DragPan, KeyboardPan and DragZoom interactions now make sure to animate to a valid center/resolution target to avoid a chained "resolve" animation which looks weird. The `View.fit` method was also fixed to use this.
This commit is contained in:
@@ -114,7 +114,7 @@ export function pan(view, delta, opt_duration) {
|
||||
view.animate({
|
||||
duration: opt_duration !== undefined ? opt_duration : 250,
|
||||
easing: linear,
|
||||
center: center
|
||||
center: view.getValidCenter(center)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user