diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index fee9e65855..1762bbcb63 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -661,6 +661,8 @@ * @property {string|undefined} text Text. * @property {string|undefined} textAlign Text alignment. * @property {string|undefined} textBaseline Text base line. + * @property {ol.style.Fill|undefined} fill Fill style. + * @property {ol.style.Stroke|undefined} stroke Stroke style. * @todo stability experimental */ diff --git a/src/ol/style/textstyle.js b/src/ol/style/textstyle.js index 028d41db81..a3ce1038fb 100644 --- a/src/ol/style/textstyle.js +++ b/src/ol/style/textstyle.js @@ -32,6 +32,16 @@ ol.style.Text = function(options) { * @type {string|undefined} */ this.textBaseline = options.textBaseline; + + /** + * @type {ol.style.Fill} + */ + this.fill = goog.isDef(options.fill) ? options.fill : null; + + /** + * @type {ol.style.Stroke} + */ + this.stroke = goog.isDef(options.stroke) ? options.stroke : null; };