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

View File

@@ -15,16 +15,16 @@ import {DEFAULT_LINEDASH, DEFAULT_LINEDASHOFFSET, DEFAULT_STROKESTYLE,
import {FLOAT} from '../../webgl.js';
import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @constructor
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLCircleReplay {
class WebGLCircleReplay extends WebGLReplay {
/**
* @constructor
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
WebGLReplay.call(this, tolerance, maxExtent);
super(tolerance, maxExtent);
/**
* @private
@@ -404,7 +404,5 @@ class WebGLCircleReplay {
}
}
inherits(WebGLCircleReplay, WebGLReplay);
export default WebGLCircleReplay;

View File

@@ -5,16 +5,16 @@ import {getUid, inherits} from '../../util.js';
import WebGLTextureReplay from '../webgl/TextureReplay.js';
import WebGLBuffer from '../../webgl/Buffer.js';
/**
* @constructor
* @extends {module:ol/render/webgl/TextureReplay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLImageReplay {
class WebGLImageReplay extends WebGLTextureReplay {
/**
* @constructor
* @extends {module:ol/render/webgl/TextureReplay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
WebGLTextureReplay.call(this, tolerance, maxExtent);
super(tolerance, maxExtent);
/**
* @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
@@ -163,7 +163,5 @@ class WebGLImageReplay {
}
}
inherits(WebGLImageReplay, WebGLTextureReplay);
export default WebGLImageReplay;

View File

@@ -8,21 +8,21 @@ import ReplayType from '../ReplayType.js';
import VectorContext from '../VectorContext.js';
import WebGLReplayGroup from '../webgl/ReplayGroup.js';
/**
* @constructor
* @extends {module:ol/render/VectorContext}
* @param {module:ol/webgl/Context} context Context.
* @param {module:ol/coordinate~Coordinate} center Center.
* @param {number} resolution Resolution.
* @param {number} rotation Rotation.
* @param {module:ol/size~Size} size Size.
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} pixelRatio Pixel ratio.
* @struct
*/
class WebGLImmediateRenderer {
class WebGLImmediateRenderer extends VectorContext {
/**
* @constructor
* @extends {module:ol/render/VectorContext}
* @param {module:ol/webgl/Context} context Context.
* @param {module:ol/coordinate~Coordinate} center Center.
* @param {number} resolution Resolution.
* @param {number} rotation Rotation.
* @param {module:ol/size~Size} size Size.
* @param {module:ol/extent~Extent} extent Extent.
* @param {number} pixelRatio Pixel ratio.
* @struct
*/
constructor(context, center, resolution, rotation, size, extent, pixelRatio) {
VectorContext.call(this);
super();
/**
* @private
@@ -385,7 +385,5 @@ class WebGLImmediateRenderer {
}
}
inherits(WebGLImmediateRenderer, VectorContext);
export default WebGLImmediateRenderer;

View File

@@ -35,16 +35,16 @@ const Instruction = {
};
/**
* @constructor
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLLineStringReplay {
class WebGLLineStringReplay extends WebGLReplay {
/**
* @constructor
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
WebGLReplay.call(this, tolerance, maxExtent);
super(tolerance, maxExtent);
/**
* @private
@@ -666,7 +666,5 @@ class WebGLLineStringReplay {
}
}
inherits(WebGLLineStringReplay, WebGLReplay);
export default WebGLLineStringReplay;

View File

@@ -36,16 +36,16 @@ import WebGLBuffer from '../../webgl/Buffer.js';
*/
/**
* @constructor
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLPolygonReplay {
class WebGLPolygonReplay extends WebGLReplay {
/**
* @constructor
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
WebGLReplay.call(this, tolerance, maxExtent);
super(tolerance, maxExtent);
this.lineStringReplay = new WebGLLineStringReplay(
tolerance, maxExtent);
@@ -1045,7 +1045,5 @@ class WebGLPolygonReplay {
}
}
inherits(WebGLPolygonReplay, WebGLReplay);
export default WebGLPolygonReplay;

View File

@@ -15,17 +15,17 @@ import {create, fromTransform} from '../../vec/mat4.js';
import {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,
UNSIGNED_INT, UNSIGNED_SHORT} from '../../webgl.js';
/**
* @constructor
* @abstract
* @extends {module:ol/render/VectorContext}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLReplay {
class WebGLReplay extends VectorContext {
/**
* @constructor
* @abstract
* @extends {module:ol/render/VectorContext}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
VectorContext.call(this);
super();
/**
* @protected
@@ -359,7 +359,5 @@ class WebGLReplay {
}
}
inherits(WebGLReplay, VectorContext);
export default WebGLReplay;

View File

@@ -32,17 +32,17 @@ const BATCH_CONSTRUCTORS = {
};
/**
* @constructor
* @extends {module:ol/render/ReplayGroup}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @param {number=} opt_renderBuffer Render buffer.
* @struct
*/
class WebGLReplayGroup {
class WebGLReplayGroup extends ReplayGroup {
/**
* @constructor
* @extends {module:ol/render/ReplayGroup}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @param {number=} opt_renderBuffer Render buffer.
* @struct
*/
constructor(tolerance, maxExtent, opt_renderBuffer) {
ReplayGroup.call(this);
super();
/**
* @type {module:ol/extent~Extent}
@@ -341,7 +341,5 @@ class WebGLReplayGroup {
}
}
inherits(WebGLReplayGroup, ReplayGroup);
export default WebGLReplayGroup;

View File

@@ -22,16 +22,16 @@ import WebGLBuffer from '../../webgl/Buffer.js';
*/
/**
* @constructor
* @extends {module:ol/render/webgl/TextureReplay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLTextReplay {
class WebGLTextReplay extends WebGLTextureReplay {
/**
* @constructor
* @extends {module:ol/render/webgl/TextureReplay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
WebGLTextureReplay.call(this, tolerance, maxExtent);
super(tolerance, maxExtent);
/**
* @private
@@ -457,7 +457,5 @@ class WebGLTextReplay {
}
}
inherits(WebGLTextReplay, WebGLTextureReplay);
export default WebGLTextReplay;

View File

@@ -10,17 +10,17 @@ import WebGLReplay from '../webgl/Replay.js';
import {CLAMP_TO_EDGE, FLOAT, TEXTURE_2D} from '../../webgl.js';
import {createTexture} from '../../webgl/Context.js';
/**
* @constructor
* @abstract
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
class WebGLTextureReplay {
class WebGLTextureReplay extends WebGLReplay {
/**
* @constructor
* @abstract
* @extends {module:ol/render/webgl/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @struct
*/
constructor(tolerance, maxExtent) {
WebGLReplay.call(this, tolerance, maxExtent);
super(tolerance, maxExtent);
/**
* @type {number|undefined}
@@ -478,7 +478,5 @@ class WebGLTextureReplay {
getHitDetectionTextures() {}
}
inherits(WebGLTextureReplay, WebGLReplay);
export default WebGLTextureReplay;