View / better names for getValid* and applyParameters_ methods
This commit is contained in:
@@ -116,7 +116,7 @@ class Zoom extends Control {
|
||||
}
|
||||
const currentZoom = view.getZoom();
|
||||
if (currentZoom !== undefined) {
|
||||
const newZoom = view.getValidZoomLevel(currentZoom + delta);
|
||||
const newZoom = view.getConstrainedZoom(currentZoom + delta);
|
||||
if (this.duration_ > 0) {
|
||||
if (view.getAnimating()) {
|
||||
view.cancelAnimations();
|
||||
|
||||
@@ -217,7 +217,7 @@ class ZoomSlider extends Control {
|
||||
event.offsetY - this.thumbSize_[1] / 2);
|
||||
|
||||
const resolution = this.getResolutionForPosition_(relativePosition);
|
||||
const zoom = view.getValidZoomLevel(view.getZoomForResolution(resolution));
|
||||
const zoom = view.getConstrainedZoom(view.getZoomForResolution(resolution));
|
||||
|
||||
view.animate({
|
||||
zoom: zoom,
|
||||
|
||||
Reference in New Issue
Block a user