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

@@ -278,7 +278,7 @@ ol.render.canvas.Immediate.prototype.setFillStrokeStyle =
if (!ol.style.stroke.equals(state.strokeStyle, 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;
}
state.strokeStyle = strokeStyle;
}