From 66bda9259787356f8bb30d814eac9597d494e5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Nov 2013 14:39:12 +0100 Subject: [PATCH] Make setting stroke color and width optional --- src/objectliterals.jsdoc | 4 ++-- src/ol/style/strokestyle.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 722358a6ce..28ade9fae5 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -638,8 +638,8 @@ /** * @typedef {Object} ol.style.StrokeOptions - * @property {ol.Color|string} color Color. - * @property {number} width Width. + * @property {ol.Color|string|undefined} color Color. + * @property {number|undefined} width Width. * @todo stability experimental */ diff --git a/src/ol/style/strokestyle.js b/src/ol/style/strokestyle.js index 5be2a6004d..91fbc29352 100644 --- a/src/ol/style/strokestyle.js +++ b/src/ol/style/strokestyle.js @@ -13,10 +13,10 @@ ol.style.Stroke = function(options) { /** * @type {ol.Color|string} */ - this.color = options.color; + this.color = goog.isDef(options.color) ? options.color : null; /** - * @type {number} + * @type {number|undefined} */ this.width = options.width; };