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
+13 -16
View File
@@ -5,21 +5,20 @@ import {inherits} from '../../util.js';
import CanvasInstruction from '../canvas/Instruction.js';
import CanvasReplay from '../canvas/Replay.js';
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
class CanvasImageReplay {
class CanvasImageReplay extends CanvasReplay {
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
CanvasReplay.call(this,
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
/**
* @private
@@ -225,7 +224,5 @@ class CanvasImageReplay {
}
}
inherits(CanvasImageReplay, CanvasReplay);
export default CanvasImageReplay;
+20 -22
View File
@@ -17,27 +17,27 @@ import VectorContext from '../VectorContext.js';
import {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';
import {create as createTransform, compose as composeTransform} from '../../transform.js';
/**
* @classdesc
* A concrete subclass of {@link module:ol/render/VectorContext} that implements
* direct rendering of features and geometries to an HTML5 Canvas context.
* Instances of this class are created internally by the library and
* provided to application code as vectorContext member of the
* {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and
* render events emitted by layers and maps.
*
* @constructor
* @extends {module:ol/render/VectorContext}
* @param {CanvasRenderingContext2D} context Context.
* @param {number} pixelRatio Pixel ratio.
* @param {module:ol/extent~Extent} extent Extent.
* @param {module:ol/transform~Transform} transform Transform.
* @param {number} viewRotation View rotation.
* @struct
*/
class CanvasImmediateRenderer {
class CanvasImmediateRenderer extends VectorContext {
/**
* @classdesc
* A concrete subclass of {@link module:ol/render/VectorContext} that implements
* direct rendering of features and geometries to an HTML5 Canvas context.
* Instances of this class are created internally by the library and
* provided to application code as vectorContext member of the
* {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and
* render events emitted by layers and maps.
*
* @constructor
* @extends {module:ol/render/VectorContext}
* @param {CanvasRenderingContext2D} context Context.
* @param {number} pixelRatio Pixel ratio.
* @param {module:ol/extent~Extent} extent Extent.
* @param {module:ol/transform~Transform} transform Transform.
* @param {number} viewRotation View rotation.
* @struct
*/
constructor(context, pixelRatio, extent, transform, viewRotation) {
VectorContext.call(this);
super();
/**
* @private
@@ -943,7 +943,5 @@ class CanvasImmediateRenderer {
}
}
inherits(CanvasImmediateRenderer, VectorContext);
export default CanvasImmediateRenderer;
+13 -16
View File
@@ -5,21 +5,20 @@ import {inherits} from '../../util.js';
import CanvasInstruction, {strokeInstruction, beginPathInstruction} from '../canvas/Instruction.js';
import CanvasReplay from '../canvas/Replay.js';
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
class CanvasLineStringReplay {
class CanvasLineStringReplay extends CanvasReplay {
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
CanvasReplay.call(this,
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
}
/**
@@ -118,7 +117,5 @@ class CanvasLineStringReplay {
}
}
inherits(CanvasLineStringReplay, CanvasReplay);
export default CanvasLineStringReplay;
+13 -16
View File
@@ -11,21 +11,20 @@ import CanvasInstruction, {
import CanvasReplay from '../canvas/Replay.js';
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
class CanvasPolygonReplay {
class CanvasPolygonReplay extends CanvasReplay {
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
CanvasReplay.call(this,
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
}
/**
@@ -215,7 +214,5 @@ class CanvasPolygonReplay {
}
}
inherits(CanvasPolygonReplay, CanvasReplay);
export default CanvasPolygonReplay;
+13 -15
View File
@@ -41,20 +41,20 @@ const tmpExtent = createEmpty();
const tmpTransform = createTransform();
/**
* @constructor
* @extends {module:ol/render/VectorContext}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
class CanvasReplay {
class CanvasReplay extends VectorContext {
/**
* @constructor
* @extends {module:ol/render/VectorContext}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
VectorContext.call(this);
super();
/**
* @type {?}
@@ -1082,8 +1082,6 @@ class CanvasReplay {
}
}
inherits(CanvasReplay, VectorContext);
/**
* FIXME empty description for jsdoc
+15 -17
View File
@@ -33,20 +33,20 @@ const BATCH_CONSTRUCTORS = {
};
/**
* @constructor
* @extends {module:ol/render/ReplayGroup}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay group can have overlapping geometries.
* @param {?} declutterTree Declutter tree
* for declutter processing in postrender.
* @param {number=} opt_renderBuffer Optional rendering buffer.
* @struct
*/
class CanvasReplayGroup {
class CanvasReplayGroup extends ReplayGroup {
/**
* @constructor
* @extends {module:ol/render/ReplayGroup}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Max extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay group can have overlapping geometries.
* @param {?} declutterTree Declutter tree
* for declutter processing in postrender.
* @param {number=} opt_renderBuffer Optional rendering buffer.
* @struct
*/
constructor(
tolerance,
maxExtent,
@@ -56,7 +56,7 @@ class CanvasReplayGroup {
declutterTree,
opt_renderBuffer
) {
ReplayGroup.call(this);
super();
/**
* Declutter tree.
@@ -407,8 +407,6 @@ class CanvasReplayGroup {
}
}
inherits(CanvasReplayGroup, ReplayGroup);
/**
* This cache is used for storing calculated pixel circles for increasing performance.
+13 -16
View File
@@ -14,21 +14,20 @@ import CanvasReplay from '../canvas/Replay.js';
import {TEXT_ALIGN} from '../replay.js';
import TextPlacement from '../../style/TextPlacement.js';
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
class CanvasTextReplay {
class CanvasTextReplay extends CanvasReplay {
/**
* @constructor
* @extends {module:ol/render/canvas/Replay}
* @param {number} tolerance Tolerance.
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
* @param {number} resolution Resolution.
* @param {number} pixelRatio Pixel ratio.
* @param {boolean} overlaps The replay can have overlapping geometries.
* @param {?} declutterTree Declutter tree.
* @struct
*/
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
CanvasReplay.call(this,
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
/**
* @private
@@ -521,8 +520,6 @@ class CanvasTextReplay {
}
}
inherits(CanvasTextReplay, CanvasReplay);
/**
* @param {string} font Font to use for measuring.