diff --git a/src/ol/canvasfunction.js b/src/ol/canvasfunction.js index 202952effa..10caa4be88 100644 --- a/src/ol/canvasfunction.js +++ b/src/ol/canvasfunction.js @@ -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; diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index a965bcd75f..e027da504d 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -7,7 +7,9 @@ goog.require('goog.math'); /** - * A function that formats a {@link ol.Coordinate} into a string. + * A function that takes a {@link ol.Coordinate} and transforms it into a + * `{string}`. + * * @typedef {function((ol.Coordinate|undefined)): string} * @todo stability experimental */ diff --git a/src/ol/events/condition.js b/src/ol/events/condition.js index dbedefbfdc..d6afa87bfc 100644 --- a/src/ol/events/condition.js +++ b/src/ol/events/condition.js @@ -8,7 +8,11 @@ goog.require('ol.MapBrowserEvent.EventType'); /** + * A function that takes an {@link ol.MapBrowserEvent} and returns a + * `{boolean}`. If the condition is met, true should be returned. + * * @typedef {function(ol.MapBrowserEvent): boolean} + * @todo stability experimental */ ol.events.ConditionType; diff --git a/src/ol/feature.js b/src/ol/feature.js index 54439b1b8c..68f36d1cec 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -203,6 +203,11 @@ ol.Feature.prototype.setGeometryName = function(name) { /** + * A function that takes a `{number}` representing the view's resolution. It + * returns an Array of {@link ol.style.Style}. This way individual features + * can be styled. The this keyword inside the function references the + * {@link ol.Feature} to be styled. + * * @typedef {function(this: ol.Feature, number): Array.