Added cloning of image element, color cloning
This commit is contained in:
@@ -31,13 +31,14 @@ ol.style.Fill = function(opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* Clones the style.
|
||||
* Clones the style. The color is not cloned if it is an {@link ol.ColorLike}.
|
||||
* @return {ol.style.Fill} The cloned style.
|
||||
* @api
|
||||
*/
|
||||
ol.style.Fill.prototype.clone = function() {
|
||||
var color = this.getColor();
|
||||
return new ol.style.Fill({
|
||||
color: (this.getColor() instanceof Array) ? this.getColor().slice(0) : this.getColor()
|
||||
color: (color && color.slice) ? color.slice() : color || undefined
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user