Add offsetX and offsetY properties to ol.style.Text
This commit is contained in:
@@ -57,6 +57,18 @@ ol.style.Text = function(opt_options) {
|
||||
* @type {ol.style.Stroke}
|
||||
*/
|
||||
this.stroke_ = goog.isDef(options.stroke) ? options.stroke : null;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.offsetX_ = goog.isDef(options.offsetX) ? options.offsetX : 0;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.offsetY_ = goog.isDef(options.offsetY) ? options.offsetY : 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -68,6 +80,22 @@ ol.style.Text.prototype.getFont = function() {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Horizontal text offset.
|
||||
*/
|
||||
ol.style.Text.prototype.getOffsetX = function() {
|
||||
return this.offsetX_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Vertical text offset.
|
||||
*/
|
||||
ol.style.Text.prototype.getOffsetY = function() {
|
||||
return this.offsetY_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.style.Fill} Fill style.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user