Use extends and super for WebGLMap

This commit is contained in:
ahocevar
2018-07-17 14:21:50 +02:00
parent 4f26f145ae
commit 778e867c79
+2 -6
View File
@@ -1,7 +1,6 @@
/** /**
* @module ol/WebGLMap * @module ol/WebGLMap
*/ */
import {inherits} from './util.js';
import PluggableMap from './PluggableMap.js'; import PluggableMap from './PluggableMap.js';
import {defaults as defaultControls} from './control.js'; import {defaults as defaultControls} from './control.js';
import {defaults as defaultInteractions} from './interaction.js'; import {defaults as defaultInteractions} from './interaction.js';
@@ -57,14 +56,13 @@ import WebGLVectorLayerRenderer from './renderer/webgl/VectorLayer.js';
* {@link module:ol/layer/Base}, so layers entered in the options or added * {@link module:ol/layer/Base}, so layers entered in the options or added
* with `addLayer` can be groups, which can contain further groups, and so on. * with `addLayer` can be groups, which can contain further groups, and so on.
* *
* @extends {module:ol/PluggableMap}
* @fires module:ol/MapBrowserEvent~MapBrowserEvent * @fires module:ol/MapBrowserEvent~MapBrowserEvent
* @fires module:ol/MapEvent~MapEvent * @fires module:ol/MapEvent~MapEvent
* @fires module:ol/render/Event~RenderEvent#postcompose * @fires module:ol/render/Event~RenderEvent#postcompose
* @fires module:ol/render/Event~RenderEvent#precompose * @fires module:ol/render/Event~RenderEvent#precompose
* @api * @api
*/ */
class WebGLMap { class WebGLMap extends PluggableMap {
/** /**
* @param {module:ol/PluggableMap~MapOptions} options Map options. * @param {module:ol/PluggableMap~MapOptions} options Map options.
@@ -78,7 +76,7 @@ class WebGLMap {
options.interactions = defaultInteractions(); options.interactions = defaultInteractions();
} }
PluggableMap.call(this, options); super(options);
} }
createRenderer() { createRenderer() {
@@ -92,7 +90,5 @@ class WebGLMap {
} }
} }
inherits(WebGLMap, PluggableMap);
export default WebGLMap; export default WebGLMap;