Better description for the opt_direction parameter
This commit is contained in:
+8
-6
@@ -1465,9 +1465,10 @@ class View extends BaseObject {
|
|||||||
/**
|
/**
|
||||||
* Get a valid zoom level according to the current view constraints.
|
* Get a valid zoom level according to the current view constraints.
|
||||||
* @param {number|undefined} targetZoom Target zoom.
|
* @param {number|undefined} targetZoom Target zoom.
|
||||||
* @param {number=} opt_direction Direction. Default is `0`. Specify `-1` or `1` to return
|
* @param {number=} [opt_direction=0] Indicate which resolution should be used
|
||||||
* the available value respectively lower or greater than the target one. Leaving `0` will simply choose
|
* by a renderer if the view resolution does not match any resolution of the tile source.
|
||||||
* the nearest available value.
|
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution
|
||||||
|
* will be used. If -1, the nearest higher resolution will be used.
|
||||||
* @return {number|undefined} Valid zoom level.
|
* @return {number|undefined} Valid zoom level.
|
||||||
*/
|
*/
|
||||||
getConstrainedZoom(targetZoom, opt_direction) {
|
getConstrainedZoom(targetZoom, opt_direction) {
|
||||||
@@ -1478,9 +1479,10 @@ class View extends BaseObject {
|
|||||||
/**
|
/**
|
||||||
* Get a valid resolution according to the current view constraints.
|
* Get a valid resolution according to the current view constraints.
|
||||||
* @param {number|undefined} targetResolution Target resolution.
|
* @param {number|undefined} targetResolution Target resolution.
|
||||||
* @param {number=} opt_direction Direction. Default is `0`. Specify `-1` or `1` to return
|
* @param {number=} [opt_direction=0] Indicate which resolution should be used
|
||||||
* the available value respectively lower or greater than the target one. Leaving `0` will simply choose
|
* by a renderer if the view resolution does not match any resolution of the tile source.
|
||||||
* the nearest available value.
|
* If 0, the nearest resolution will be used. If 1, the nearest lower resolution
|
||||||
|
* will be used. If -1, the nearest higher resolution will be used.
|
||||||
* @return {number|undefined} Valid resolution.
|
* @return {number|undefined} Valid resolution.
|
||||||
*/
|
*/
|
||||||
getConstrainedResolution(targetResolution, opt_direction) {
|
getConstrainedResolution(targetResolution, opt_direction) {
|
||||||
|
|||||||
Reference in New Issue
Block a user