diff --git a/externs/olx.js b/externs/olx.js index 71328756d5..0d7370bdb1 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -204,8 +204,8 @@ olx.control; * collapsible: (boolean|undefined), * collapsed: (boolean|undefined), * tipLabel: (string|undefined), - * label: (string|Node|undefined), - * collapseLabel: (string|Node|undefined), + * label: (string|Element|undefined), + * collapseLabel: (string|Element|undefined), * render: (function(ol.MapEvent)|undefined), * target: (Element|string|undefined)}} */ @@ -258,8 +258,8 @@ olx.control.AttributionOptions.prototype.tipLabel; /** * Text label to use for the collapsed attributions button. Default is `i`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.AttributionOptions.prototype.label; @@ -267,8 +267,8 @@ olx.control.AttributionOptions.prototype.label; /** * Text label to use for the expanded attributions button. Default is `»`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.AttributionOptions.prototype.collapseLabel; @@ -320,8 +320,8 @@ olx.control.ControlOptions.prototype.target; /** * @typedef {{className: (string|undefined), - * label: (string|Node|undefined), - * labelActive: (string|Node|undefined), + * label: (string|Element|undefined), + * labelActive: (string|Element|undefined), * tipLabel: (string|undefined), * keys: (boolean|undefined), * target: (Element|string|undefined), @@ -340,8 +340,8 @@ olx.control.FullScreenOptions.prototype.className; /** * Text label to use for the button. Default is `\u2922` (NORTH EAST AND SOUTH WEST ARROW). - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.FullScreenOptions.prototype.label; @@ -350,8 +350,8 @@ olx.control.FullScreenOptions.prototype.label; /** * Text label to use for the button when full-screen is active. * Default is `\u00d7` (a cross). - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.FullScreenOptions.prototype.labelActive; @@ -451,9 +451,9 @@ olx.control.MousePositionOptions.prototype.undefinedHTML; /** * @typedef {{collapsed: (boolean|undefined), - * collapseLabel: (string|Node|undefined), + * collapseLabel: (string|Element|undefined), * collapsible: (boolean|undefined), - * label: (string|Node|undefined), + * label: (string|Element|undefined), * layers: (Array.|ol.Collection.|undefined), * render: (function(ol.MapEvent)|undefined), * target: (Element|string|undefined), @@ -474,8 +474,8 @@ olx.control.OverviewMapOptions.prototype.collapsed; /** * Text label to use for the expanded overviewmap button. Default is `«`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.OverviewMapOptions.prototype.collapseLabel; @@ -491,8 +491,8 @@ olx.control.OverviewMapOptions.prototype.collapsible; /** * Text label to use for the collapsed overviewmap button. Default is `»`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.OverviewMapOptions.prototype.label; @@ -617,7 +617,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. + * Instead of text, also an element (e.g. a `span` element) can be used. * @type {string|Element|undefined} * @api */ @@ -678,8 +678,8 @@ olx.control.RotateOptions.prototype.target; /** * @typedef {{duration: (number|undefined), * className: (string|undefined), - * zoomInLabel: (string|Node|undefined), - * zoomOutLabel: (string|Node|undefined), + * zoomInLabel: (string|Element|undefined), + * zoomOutLabel: (string|Element|undefined), * zoomInTipLabel: (string|undefined), * zoomOutTipLabel: (string|undefined), * delta: (number|undefined), @@ -706,8 +706,8 @@ olx.control.ZoomOptions.prototype.className; /** * Text label to use for the zoom-in button. Default is `+`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.ZoomOptions.prototype.zoomInLabel; @@ -715,8 +715,8 @@ olx.control.ZoomOptions.prototype.zoomInLabel; /** * Text label to use for the zoom-out button. Default is `-`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.ZoomOptions.prototype.zoomOutLabel; @@ -809,7 +809,7 @@ olx.control.ZoomSliderOptions.prototype.render; /** * @typedef {{className: (string|undefined), * target: (Element|string|undefined), - * label: (string|Node|undefined), + * label: (string|Element|undefined), * tipLabel: (string|undefined), * extent: (ol.Extent|undefined)}} */ @@ -835,8 +835,8 @@ olx.control.ZoomToExtentOptions.prototype.target; /** * Text label to use for the button. Default is `E`. - * Instead of text, also a Node (e.g. a `span` element) can be used. - * @type {string|Node|undefined} + * Instead of text, also an element (e.g. a `span` element) can be used. + * @type {string|Element|undefined} * @api */ olx.control.ZoomToExtentOptions.prototype.label; diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 3617503080..41d518ca16 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -44,7 +44,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js * @property {module:ol/coordinate~Coordinate} focus * @property {number} index * @property {Object.} layerStates - * @property {Array.} layerStatesArray * @property {module:ol/transform~Transform} pixelToCoordinateTransform * @property {Array.} postRenderFunctions * @property {module:ol/size~Size} size diff --git a/src/ol/control/Attribution.js b/src/ol/control/Attribution.js index 6d7347badc..6224c417fe 100644 --- a/src/ol/control/Attribution.js +++ b/src/ol/control/Attribution.js @@ -58,7 +58,7 @@ const Attribution = function(opt_options) { if (typeof collapseLabel === 'string') { /** * @private - * @type {Node} + * @type {Element} */ this.collapseLabel_ = document.createElement('span'); this.collapseLabel_.textContent = collapseLabel; @@ -71,7 +71,7 @@ const Attribution = function(opt_options) { if (typeof label === 'string') { /** * @private - * @type {Node} + * @type {Element} */ this.label_ = document.createElement('span'); this.label_.textContent = label; diff --git a/src/ol/control/FullScreen.js b/src/ol/control/FullScreen.js index 18e40839f7..e05459233e 100644 --- a/src/ol/control/FullScreen.js +++ b/src/ol/control/FullScreen.js @@ -64,7 +64,7 @@ const FullScreen = function(opt_options) { /** * @private - * @type {Node} + * @type {Element} */ this.labelNode_ = typeof label === 'string' ? document.createTextNode(label) : label; @@ -73,7 +73,7 @@ const FullScreen = function(opt_options) { /** * @private - * @type {Node} + * @type {Element} */ this.labelActiveNode_ = typeof labelActive === 'string' ? document.createTextNode(labelActive) : labelActive; @@ -217,7 +217,7 @@ function isFullScreen() { /** * Request to fullscreen an element. - * @param {Node} element Element to request fullscreen + * @param {Element} element Element to request fullscreen */ function requestFullScreen(element) { if (element.requestFullscreen) { @@ -233,7 +233,7 @@ function requestFullScreen(element) { /** * Request to fullscreen an element with keyboard input. - * @param {Node} element Element to request fullscreen + * @param {Element} element Element to request fullscreen */ function requestFullScreenWithKeys(element) { if (element.mozRequestFullScreenWithKeys) { diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index 80f870fc0e..274523bae1 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -74,7 +74,7 @@ const OverviewMap = function(opt_options) { if (typeof collapseLabel === 'string') { /** * @private - * @type {Node} + * @type {Element} */ this.collapseLabel_ = document.createElement('span'); this.collapseLabel_.textContent = collapseLabel; @@ -88,7 +88,7 @@ const OverviewMap = function(opt_options) { if (typeof label === 'string') { /** * @private - * @type {Node} + * @type {Element} */ this.label_ = document.createElement('span'); this.label_.textContent = label; diff --git a/src/ol/index.js b/src/ol/index.js index 2b4531cf42..0e289d3923 100644 --- a/src/ol/index.js +++ b/src/ol/index.js @@ -26,7 +26,6 @@ export const DEBUG_WEBGL = true; * TODO: move to a separate ol-webgl package * The maximum supported WebGL texture size in pixels. If WebGL is not * supported, the value is set to `undefined`. - * @const * @type {number|undefined} */ let WEBGL_MAX_TEXTURE_SIZE; // value is set below @@ -35,7 +34,6 @@ let WEBGL_MAX_TEXTURE_SIZE; // value is set below /** * TODO: move to a separate ol-webgl package * List of supported WebGL extensions. - * @const * @type {Array.} */ let WEBGL_EXTENSIONS; // value is set below