Add documentation for API typedef functions

This commit is contained in:
Bart van den Eijnden
2014-02-13 13:23:04 +01:00
parent 20402a6e71
commit 87d651af04
6 changed files with 36 additions and 1 deletions

View File

@@ -2,7 +2,16 @@ goog.provide('ol.CanvasFunctionType');
/**
* A function returning the canvas element (`{HTMLCanvasElement}`)
* used by the source as an image. The arguments passed to the function are:
* {@link ol.Extent} the image extent, `{number}` the image resolution,
* `{number}` the device pixel ratio, {@link ol.Size} the image size, and
* {@link ol.proj.Projection} the image projection. The canvas returned by
* this function is cached by the source. The this keyword inside the function
* references the {@link ol.source.ImageCanvas}.
*
* @typedef {function(this:ol.source.ImageCanvas, ol.Extent, number,
* number, ol.Size, ol.proj.Projection): HTMLCanvasElement}
* @todo stability experimental
*/
ol.CanvasFunctionType;