From 01379870153994883c728dbc1790c3fae39c0c67 Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Thu, 23 Jan 2014 02:22:11 +0100 Subject: [PATCH] Add scale to ol.style.Text --- src/objectliterals.jsdoc | 1 + src/ol/style/textstyle.js | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 12c3dc27ac..d64cd8437a 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -943,6 +943,7 @@ /** * @typedef {Object} olx.style.TextOptions * @property {string|undefined} font Font. + * @property {number|undefined} scale Scale. * @property {number|undefined} rotation Rotation. * @property {string|undefined} text Text. * @property {string|undefined} textAlign Text alignment. diff --git a/src/ol/style/textstyle.js b/src/ol/style/textstyle.js index 73cd18f0e5..d6b2cecbd1 100644 --- a/src/ol/style/textstyle.js +++ b/src/ol/style/textstyle.js @@ -22,6 +22,12 @@ ol.style.Text = function(opt_options) { */ this.rotation_ = options.rotation; + /** + * @private + * @type {number|undefined} + */ + this.scale_ = options.scale; + /** * @private * @type {string|undefined} @@ -78,6 +84,14 @@ ol.style.Text.prototype.getRotation = function() { }; +/** + * @return {number|undefined} Scale. + */ +ol.style.Text.prototype.getScale = function() { + return this.scale_; +}; + + /** * @return {ol.style.Stroke} Stroke style. */