Allow ol.style.Stroke#width to be undefined

This commit is contained in:
Tom Payne
2013-11-14 00:05:18 +01:00
parent 6796b9735e
commit d60bc61a72
3 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ ol.shape.renderCircle = function(radius, fillStyle, strokeStyle) {
}
if (goog.isDefAndNotNull(strokeStyle)) {
context.strokeStyle = ol.color.asString(strokeStyle.color);
context.lineWidth = strokeStyle.width;
context.lineWidth = goog.isDef(strokeStyle.width) ? strokeStyle.width : 1;
context.stroke();
}