From d49d96d651e4a43efc49ea7d1a6b1d807d4dbfa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 28 Jan 2014 21:36:32 +0100 Subject: [PATCH] Add comments for the canvasFunction option --- src/objectliterals.jsdoc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 6c1c23e5f1..80bb5cb20a 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -652,7 +652,14 @@ /** * @typedef {Object} olx.source.ImageCanvasOptions * @property {Array.|undefined} attributions Attributions. - * @property {ol.CanvasFunctionType} canvasFunction Canvas function. + * @property {ol.CanvasFunctionType} canvasFunction Canvas function. The function + * returning the canvas element used by the source as an image. The arguments + * passed to the function are: `{ol.Extent}` the image extent, `{number}` the + * image resolution, `{number}` the device pixel ratio, `{ol.Size}` the image + * size, and `{ol.proj.Projection}` the image projection. The canvas returned + * by this function is cached by the source. If the value returned by the + * function is later changed then `dispatchChangeEvent` should be called on + * the source for the source to invalidate the current cached image. * @property {ol.Extent|undefined} extent Extent. * @property {string|undefined} logo Logo. * @property {ol.proj.ProjectionLike} projection Projection.