Merge pull request #11989 from mike-000/patch-27

Correct pixel ratio descriptions
This commit is contained in:
Andreas Hocevar
2021-02-06 18:41:40 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -15,8 +15,8 @@ import {
* A function returning the canvas element (`{HTMLCanvasElement}`) * A function returning the canvas element (`{HTMLCanvasElement}`)
* used by the source as an image. The arguments passed to the function are: * used by the source as an image. The arguments passed to the function are:
* {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution, * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,
* `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and * `{number}` the pixel ratio of the map, {@link module:ol/size~Size} the image size,
* {@link module:ol/proj/Projection} the image projection. The canvas returned by * and {@link module:ol/proj/Projection} the image projection. The canvas returned by
* this function is cached by the source. The this keyword inside the function * this function is cached by the source. The this keyword inside the function
* references the {@link module:ol/source/ImageCanvas}. * references the {@link module:ol/source/ImageCanvas}.
* *
@@ -30,8 +30,8 @@ import {
* @property {FunctionType} [canvasFunction] Canvas function. * @property {FunctionType} [canvasFunction] Canvas function.
* The function returning the canvas element used by the source * The function returning the canvas element used by the source
* as an image. The arguments passed to the function are: `{import("../extent.js").Extent}` the * as an image. The arguments passed to the function are: `{import("../extent.js").Extent}` the
* image extent, `{number}` the image resolution, `{number}` the device pixel * image extent, `{number}` the image resolution, `{number}` the pixel ratio of the map,
* ratio, `{import("../size.js").Size}` the image size, and `{import("../proj/Projection.js").Projection}` the image * `{import("../size.js").Size}` the image size, and `{import("../proj/Projection.js").Projection}` the image
* projection. The canvas returned by this function is cached by the source. If * projection. The canvas returned by this function is cached by the source. If
* the value returned by the function is later changed then * the value returned by the function is later changed then
* `changed` should be called on the source for the source to * `changed` should be called on the source for the source to

View File

@@ -323,7 +323,7 @@ class Icon extends ImageStyle {
/** /**
* Get the pixel ratio. * Get the pixel ratio.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @return {number} The pixel ration of the image. * @return {number} The pixel ratio of the image.
* @api * @api
*/ */
getPixelRatio(pixelRatio) { getPixelRatio(pixelRatio) {