diff --git a/src/ol/Observable.js b/src/ol/Observable.js index 19857e462b..596ea0788e 100644 --- a/src/ol/Observable.js +++ b/src/ol/Observable.js @@ -105,8 +105,7 @@ Observable.prototype.on = function(type, listener) { } return keys; } else { - return listen( - this, /** @type {string} */ (type), listener); + return listen(this, /** @type {string} */ (type), listener); } }; @@ -129,8 +128,7 @@ Observable.prototype.once = function(type, listener) { } return keys; } else { - return listenOnce( - this, /** @type {string} */ (type), listener); + return listenOnce(this, /** @type {string} */ (type), listener); } }; diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 36780ba8cd..b8c960edda 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -361,50 +361,50 @@ const PluggableMap = function(options) { this.controls.forEach( /** - * @param {ol.control.Control} control Control. - * @this {ol.PluggableMap} - */ + * @param {ol.control.Control} control Control. + * @this {ol.PluggableMap} + */ function(control) { control.setMap(this); }.bind(this)); listen(this.controls, CollectionEventType.ADD, /** - * @param {ol.CollectionEvent} event CollectionEvent. - */ + * @param {ol.CollectionEvent} event CollectionEvent. + */ function(event) { event.element.setMap(this); }, this); listen(this.controls, CollectionEventType.REMOVE, /** - * @param {ol.CollectionEvent} event CollectionEvent. - */ + * @param {ol.CollectionEvent} event CollectionEvent. + */ function(event) { event.element.setMap(null); }, this); this.interactions.forEach( /** - * @param {ol.interaction.Interaction} interaction Interaction. - * @this {ol.PluggableMap} - */ + * @param {ol.interaction.Interaction} interaction Interaction. + * @this {ol.PluggableMap} + */ function(interaction) { interaction.setMap(this); }.bind(this)); listen(this.interactions, CollectionEventType.ADD, /** - * @param {ol.CollectionEvent} event CollectionEvent. - */ + * @param {ol.CollectionEvent} event CollectionEvent. + */ function(event) { event.element.setMap(this); }, this); listen(this.interactions, CollectionEventType.REMOVE, /** - * @param {ol.CollectionEvent} event CollectionEvent. - */ + * @param {ol.CollectionEvent} event CollectionEvent. + */ function(event) { event.element.setMap(null); }, this); @@ -413,16 +413,16 @@ const PluggableMap = function(options) { listen(this.overlays_, CollectionEventType.ADD, /** - * @param {ol.CollectionEvent} event CollectionEvent. - */ + * @param {ol.CollectionEvent} event CollectionEvent. + */ function(event) { this.addOverlayInternal_(/** @type {ol.Overlay} */ (event.element)); }, this); listen(this.overlays_, CollectionEventType.REMOVE, /** - * @param {ol.CollectionEvent} event CollectionEvent. - */ + * @param {ol.CollectionEvent} event CollectionEvent. + */ function(event) { const overlay = /** @type {ol.Overlay} */ (event.element); const id = overlay.getId(); @@ -685,9 +685,7 @@ PluggableMap.prototype.getTarget = function() { PluggableMap.prototype.getTargetElement = function() { const target = this.getTarget(); if (target !== undefined) { - return typeof target === 'string' ? - document.getElementById(target) : - target; + return typeof target === 'string' ? document.getElementById(target) : target; } else { return null; } diff --git a/src/ol/View.js b/src/ol/View.js index 2fcd51bc33..826bbb55dd 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -197,8 +197,7 @@ View.prototype.applyOptions_ = function(options) { this.minResolution_, this.maxResolution_); } } - properties[ViewProperty.ROTATION] = - options.rotation !== undefined ? options.rotation : 0; + properties[ViewProperty.ROTATION] = options.rotation !== undefined ? options.rotation : 0; this.setProperties(properties); /** diff --git a/src/ol/events.js b/src/ol/events.js index d384f70b85..7763e1c3d4 100644 --- a/src/ol/events.js +++ b/src/ol/events.js @@ -33,8 +33,7 @@ export function bindListener(listenerObj) { * listener, for {@link ol.events.unlistenByKey}. * @return {ol.EventsKey|undefined} The matching listener object. */ -export function findListener(listeners, listener, opt_this, - opt_setDeleteIndex) { +export function findListener(listeners, listener, opt_this, opt_setDeleteIndex) { let listenerObj; for (let i = 0, ii = listeners.length; i < ii; ++i) { listenerObj = listeners[i]; @@ -124,8 +123,7 @@ export function listen(target, type, listener, opt_this, opt_once) { if (!listeners) { listeners = listenerMap[type] = []; } - let listenerObj = findListener(listeners, listener, opt_this, - false); + let listenerObj = findListener(listeners, listener, opt_this, false); if (listenerObj) { if (!opt_once) { // Turn one-off listener into a permanent one. @@ -188,8 +186,7 @@ export function listenOnce(target, type, listener, opt_this) { export function unlisten(target, type, listener, opt_this) { const listeners = getListeners(target, type); if (listeners) { - const listenerObj = findListener(listeners, listener, opt_this, - true); + const listenerObj = findListener(listeners, listener, opt_this, true); if (listenerObj) { unlistenByKey(listenerObj); } diff --git a/src/ol/index.js b/src/ol/index.js index f2e44acc19..b64bdd8289 100644 --- a/src/ol/index.js +++ b/src/ol/index.js @@ -43,13 +43,11 @@ let HAS_WEBGL = false; if ('WebGLRenderingContext' in window) { try { - const canvas = /** @type {HTMLCanvasElement} */ - (document.createElement('CANVAS')); + const canvas = /** @type {HTMLCanvasElement} */ (document.createElement('CANVAS')); const gl = getContext(canvas, {failIfMajorPerformanceCaveat: true}); if (gl) { HAS_WEBGL = true; - WEBGL_MAX_TEXTURE_SIZE = /** @type {number} */ - (gl.getParameter(gl.MAX_TEXTURE_SIZE)); + WEBGL_MAX_TEXTURE_SIZE = /** @type {number} */ (gl.getParameter(gl.MAX_TEXTURE_SIZE)); WEBGL_EXTENSIONS = gl.getSupportedExtensions(); } } catch (e) { diff --git a/src/ol/loadingstrategy.js b/src/ol/loadingstrategy.js index 9a799c3444..b4cc2ed6b5 100644 --- a/src/ol/loadingstrategy.js +++ b/src/ol/loadingstrategy.js @@ -48,10 +48,8 @@ export function tile(tileGrid) { const extents = []; /** @type {ol.TileCoord} */ const tileCoord = [z, 0, 0]; - for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; - ++tileCoord[1]) { - for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY; - ++tileCoord[2]) { + for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; ++tileCoord[1]) { + for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY; ++tileCoord[2]) { extents.push(tileGrid.getTileCoordExtent(tileCoord)); } }