Make setting stroke color and width optional

This commit is contained in:
Éric Lemoine
2013-11-21 14:39:12 +01:00
parent 3655d15f61
commit 66bda92597
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -638,8 +638,8 @@
/** /**
* @typedef {Object} ol.style.StrokeOptions * @typedef {Object} ol.style.StrokeOptions
* @property {ol.Color|string} color Color. * @property {ol.Color|string|undefined} color Color.
* @property {number} width Width. * @property {number|undefined} width Width.
* @todo stability experimental * @todo stability experimental
*/ */
+2 -2
View File
@@ -13,10 +13,10 @@ ol.style.Stroke = function(options) {
/** /**
* @type {ol.Color|string} * @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; this.width = options.width;
}; };