From df977d50b6c272b2a8863fde274baa85820751d8 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 10 Feb 2016 10:00:25 +0100 Subject: [PATCH 1/6] Fix type cast in ol.layer.Base constructor ol.layer.Base takes a olx.layer.BaseOptions not olx.layer.LayerOptions --- src/ol/layer/layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index b36f80204b..ab34d7eae7 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -37,7 +37,7 @@ ol.layer.Layer = function(options) { var baseOptions = ol.object.assign({}, options); delete baseOptions.source; - goog.base(this, /** @type {olx.layer.LayerOptions} */ (baseOptions)); + goog.base(this, /** @type {olx.layer.BaseOptions} */ (baseOptions)); /** * @private From 2f3c25cb95346794754a2c7392ed11ff54633cdd Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 10 Feb 2016 10:06:21 +0100 Subject: [PATCH 2/6] Fix olx.control.RotateOptions#label type Use the same as the typedef, leftover from a096ec5 --- externs/olx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externs/olx.js b/externs/olx.js index 801ac491e2..6020e48d67 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -1350,7 +1350,7 @@ olx.control.RotateOptions.prototype.className; /** * Text label to use for the rotate button. Default is `⇧`. * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * @type {string|Element|undefined} * @api stable */ olx.control.RotateOptions.prototype.label; From cf083e4f4226606b0e8807386e70f0bf32066709 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 10 Feb 2016 10:20:21 +0100 Subject: [PATCH 3/6] Remove return value from olx.interaction.PointerOptions functions handleDragEvent and handleMoveEvent functions do not return a boolean value. The typedef is already correct. --- externs/olx.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 6020e48d67..b3564cd27f 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -2910,7 +2910,7 @@ olx.interaction.PointerOptions.prototype.handleDownEvent; /** * Function handling "drag" events. This function is called on "move" events * during a drag sequence. - * @type {(function(ol.MapBrowserPointerEvent):boolean|undefined)} + * @type {(function(ol.MapBrowserPointerEvent)|undefined)} * @api */ olx.interaction.PointerOptions.prototype.handleDragEvent; @@ -2931,7 +2931,7 @@ olx.interaction.PointerOptions.prototype.handleEvent; * Function handling "move" events. This function is called on "move" events, * also during a drag sequence (so during a drag sequence both the * `handleDragEvent` function and this function are called). - * @type {(function(ol.MapBrowserPointerEvent):boolean|undefined)} + * @type {(function(ol.MapBrowserPointerEvent)|undefined)} * @api */ olx.interaction.PointerOptions.prototype.handleMoveEvent; From 95fd0e177fa088a2729969017a1f2c7100b96d2c Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 10 Feb 2016 13:19:59 +0100 Subject: [PATCH 4/6] Fix olx.render.ToContextOptions#pixelRatio type The typedef is already correct --- externs/olx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externs/olx.js b/externs/olx.js index b3564cd27f..7fc47e1e01 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -3881,7 +3881,7 @@ olx.render.ToContextOptions.prototype.size; /** * Pixel ratio (canvas pixel to css pixel ratio) for the canvas. Default * is the detected device pixel ratio. - * @type {ol.Size|undefined} + * @type {number|undefined} * @api */ olx.render.ToContextOptions.prototype.pixelRatio; From 332d6e9d5cab30145e234834fee5f7645c78a25f Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 10 Feb 2016 14:02:12 +0100 Subject: [PATCH 5/6] Add missing olx.source.XYZOptions#opaque property --- externs/olx.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/externs/olx.js b/externs/olx.js index 7fc47e1e01..dc251060d5 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5855,6 +5855,7 @@ olx.source.WMTSOptions.prototype.wrapX; * @typedef {{attributions: (Array.|undefined), * crossOrigin: (null|string|undefined), * logo: (string|olx.LogoOptions|undefined), + * opaque: (boolean|undefined), * projection: ol.proj.ProjectionLike, * reprojectionErrorThreshold: (number|undefined), * maxZoom: (number|undefined), @@ -5900,6 +5901,14 @@ olx.source.XYZOptions.prototype.crossOrigin; olx.source.XYZOptions.prototype.logo; +/** + * Whether the layer is opaque. + * @type {boolean|undefined} + * @api + */ +olx.source.XYZOptions.prototype.opaque; + + /** * Projection. Default is `EPSG:3857`. * @type {ol.proj.ProjectionLike} From 700392016332bec989726dc35d756b13582db591 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 10 Feb 2016 14:40:43 +0100 Subject: [PATCH 6/6] Fix olx.source.XYZOptions#tileGrid type The typedef is already correct --- externs/olx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externs/olx.js b/externs/olx.js index dc251060d5..66e5238e10 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5944,7 +5944,7 @@ olx.source.XYZOptions.prototype.minZoom; /** * Tile grid. - * @type {ol.tilegrid.TileGrid} + * @type {ol.tilegrid.TileGrid|undefined} * @api */ olx.source.XYZOptions.prototype.tileGrid;