From 978527f88009a11c91faa54166557a7b2e5ad05a Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 4 Mar 2013 19:31:11 +0100 Subject: [PATCH] Accept missing properties in symbolizer constructors Still need to have some discussion about when to apply defaults. --- src/ol/style/line.js | 6 +++--- src/ol/style/polygon.js | 8 ++++---- src/ol/style/shape.js | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ol/style/line.js b/src/ol/style/line.js index 7d8519067f..1f8d4bea80 100644 --- a/src/ol/style/line.js +++ b/src/ol/style/line.js @@ -48,9 +48,9 @@ ol.style.LineLiteral.prototype.equals = function(lineLiteral) { /** - * @typedef {{strokeStyle: (string|ol.Expression), - * strokeWidth: (number|ol.Expression), - * opacity: (number|ol.Expression)}} + * @typedef {{strokeStyle: (string|ol.Expression|undefined), + * strokeWidth: (number|ol.Expression|undefined), + * opacity: (number|ol.Expression|undefined)}} */ ol.style.LineOptions; diff --git a/src/ol/style/polygon.js b/src/ol/style/polygon.js index 5886ccf474..7a126abd99 100644 --- a/src/ol/style/polygon.js +++ b/src/ol/style/polygon.js @@ -53,10 +53,10 @@ ol.style.PolygonLiteral.prototype.equals = function(polygonLiteral) { /** - * @typedef {{fillStyle: (string|ol.Expression), - * strokeStyle: (string|ol.Expression), - * strokeWidth: (number|ol.Expression), - * opacity: (number|ol.Expression)}} + * @typedef {{fillStyle: (string|ol.Expression|undefined), + * strokeStyle: (string|ol.Expression|undefined), + * strokeWidth: (number|ol.Expression|undefined), + * opacity: (number|ol.Expression|undefined)}} */ ol.style.PolygonOptions; diff --git a/src/ol/style/shape.js b/src/ol/style/shape.js index 92c407c452..6fe00005e0 100644 --- a/src/ol/style/shape.js +++ b/src/ol/style/shape.js @@ -71,12 +71,12 @@ ol.style.ShapeLiteral.prototype.equals = function(shapeLiteral) { /** - * @typedef {{type: (ol.style.ShapeType), - * size: (number|ol.Expression), - * fillStyle: (string|ol.Expression), - * strokeStyle: (string|ol.Expression), - * strokeWidth: (number|ol.Expression), - * opacity: (number|ol.Expression)}} + * @typedef {{type: (ol.style.ShapeType|undefined), + * size: (number|ol.Expression|undefined), + * fillStyle: (string|ol.Expression|undefined), + * strokeStyle: (string|ol.Expression|undefined), + * strokeWidth: (number|ol.Expression|undefined), + * opacity: (number|ol.Expression|undefined)}} */ ol.style.ShapeOptions;