Add scale to ol.style.Text
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user