Merge pull request #10709 from ahocevar/stylefunction-type

Fix type and documentation of style function
This commit is contained in:
Andreas Hocevar
2020-02-20 11:25:43 +01:00
committed by GitHub

View File

@@ -13,9 +13,10 @@ import Stroke from './Stroke.js';
* A function that takes an {@link module:ol/Feature} and a `{number}`
* representing the view's resolution. The function should return a
* {@link module:ol/style/Style} or an array of them. This way e.g. a
* vector layer can be styled.
* vector layer can be styled. If the function returns `undefined`, the
* feature will not be rendered.
*
* @typedef {function(import("../Feature.js").FeatureLike, number):(Style|Array<Style>)} StyleFunction
* @typedef {function(import("../Feature.js").FeatureLike, number):(Style|Array<Style>)|undefined} StyleFunction
*/
/**