Use the default fill and stroke color
This commit is contained in:
@@ -322,7 +322,11 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
||||
var strokeWidth = 0;
|
||||
|
||||
if (this.stroke_) {
|
||||
strokeStyle = ol.colorlike.asColorLike(this.stroke_.getColor());
|
||||
strokeStyle = this.stroke_.getColor();
|
||||
if (strokeStyle === null) {
|
||||
strokeStyle = ol.render.canvas.defaultStrokeStyle;
|
||||
}
|
||||
strokeStyle = ol.colorlike.asColorLike(strokeStyle);
|
||||
strokeWidth = this.stroke_.getWidth();
|
||||
if (strokeWidth === undefined) {
|
||||
strokeWidth = ol.render.canvas.defaultLineWidth;
|
||||
@@ -442,7 +446,11 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
|
||||
|
||||
|
||||
if (this.fill_) {
|
||||
context.fillStyle = ol.colorlike.asColorLike(this.fill_.getColor());
|
||||
var color = this.fill_.getColor();
|
||||
if (color === null) {
|
||||
color = ol.render.canvas.defaultFillStyle;
|
||||
}
|
||||
context.fillStyle = ol.colorlike.asColorLike(color);
|
||||
context.fill();
|
||||
}
|
||||
if (this.stroke_) {
|
||||
|
||||
Reference in New Issue
Block a user