Pass the opt_direction value to the getConstrainedResolution function

This commit is contained in:
Frederic Junod
2019-06-27 15:13:48 +02:00
parent 800dbe72ad
commit 4b35b920a1

View File

@@ -1472,7 +1472,7 @@ class View extends BaseObject {
*/
getConstrainedZoom(targetZoom, opt_direction) {
const targetRes = this.getResolutionForZoom(targetZoom);
return this.getZoomForResolution(this.getConstrainedResolution(targetRes));
return this.getZoomForResolution(this.getConstrainedResolution(targetRes, opt_direction));
}
/**