Setter methods for fill, image, stroke and text

This commit is contained in:
Daniel Koch
2016-10-19 17:44:37 +02:00
parent b87564335e
commit c60e1d0fb3
2 changed files with 140 additions and 0 deletions

View File

@@ -125,6 +125,16 @@ ol.style.Style.prototype.getFill = function() {
};
/**
* Set the fill style.
* @param {ol.style.Fill} fill Fill style.
* @api
*/
ol.style.Style.prototype.setFill = function(fill) {
this.fill_ = fill;
};
/**
* Get the image style.
* @return {ol.style.Image} Image style.
@@ -135,6 +145,16 @@ ol.style.Style.prototype.getImage = function() {
};
/**
* Set the image style.
* @param {ol.style.Image} image Image style.
* @api
*/
ol.style.Style.prototype.setImage = function(image) {
this.image_ = image;
};
/**
* Get the stroke style.
* @return {ol.style.Stroke} Stroke style.
@@ -145,6 +165,16 @@ ol.style.Style.prototype.getStroke = function() {
};
/**
* Set the stroke style.
* @param {ol.style.Stroke} stroke Stroke style.
* @api
*/
ol.style.Style.prototype.setStroke = function(stroke) {
this.stroke_ = stroke;
};
/**
* Get the text style.
* @return {ol.style.Text} Text style.
@@ -155,6 +185,16 @@ ol.style.Style.prototype.getText = function() {
};
/**
* Set the text style.
* @param {ol.style.Text} text Text style.
* @api
*/
ol.style.Style.prototype.setText = function(text) {
this.text_ = text;
};
/**
* Get the z-index for the style.
* @return {number|undefined} ZIndex.