Remove remaining use of inherits in src

This commit is contained in:
Tim Schaub
2018-07-17 23:43:10 -06:00
parent f6046c023c
commit 1a5cf52b61
63 changed files with 837 additions and 982 deletions
+16 -18
View File
@@ -31,21 +31,21 @@ import {assign} from '../obj.js';
*/
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @constructor
* @extends {module:ol/layer/Layer}
* @fires module:ol/render/Event~RenderEvent
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
* @api
*/
class TileLayer {
class TileLayer extends Layer {
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @constructor
* @extends {module:ol/layer/Layer}
* @fires module:ol/render/Event~RenderEvent
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
* @api
*/
constructor(opt_options) {
const options = opt_options ? opt_options : {};
@@ -53,7 +53,7 @@ class TileLayer {
delete baseOptions.preload;
delete baseOptions.useInterimTilesOnError;
Layer.call(this, /** @type {module:ol/layer/Layer~Options} */ (baseOptions));
super(baseOptions);
this.setPreload(options.preload !== undefined ? options.preload : 0);
this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
@@ -109,8 +109,6 @@ class TileLayer {
}
}
inherits(TileLayer, Layer);
/**
* Return the associated {@link module:ol/source/Tile tilesource} of the layer.