From 226bf5a9eaf280d4366977be63b2f665dc1fac73 Mon Sep 17 00:00:00 2001 From: GaborFarkas Date: Fri, 8 Jul 2016 17:19:55 +0200 Subject: [PATCH] Allow empty fillStyle for polygons. --- src/ol/render/webgl/imagereplay/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/render/webgl/imagereplay/index.js b/src/ol/render/webgl/imagereplay/index.js index 73be1175a7..d0c99562c6 100644 --- a/src/ol/render/webgl/imagereplay/index.js +++ b/src/ol/render/webgl/imagereplay/index.js @@ -2043,8 +2043,8 @@ ol.render.webgl.PolygonReplay.prototype.setFillStyle_ = function(gl, color) { ol.render.webgl.PolygonReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) { goog.asserts.assert(this.state_, 'this.state_ should not be null'); - goog.asserts.assert(fillStyle, 'fillStyle should not be null'); - var fillStyleColor = fillStyle.getColor(); + goog.asserts.assert(fillStyle || strokeStyle, 'one of the styles should not be null'); + var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0]; if (!(fillStyleColor instanceof CanvasGradient) && !(fillStyleColor instanceof CanvasPattern)) { fillStyleColor = ol.color.asArray(fillStyleColor).map(function(c, i) {