Module renaming
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* @module ol/render/canvas/ImageReplay
|
||||
* @module ol/render/canvas/ImageBuilder
|
||||
*/
|
||||
import CanvasInstruction from './Instruction.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
|
||||
class CanvasImageReplay extends CanvasInstructionsBuilder {
|
||||
class CanvasImageBuilder extends CanvasInstructionsBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -214,4 +214,4 @@ class CanvasImageReplay extends CanvasInstructionsBuilder {
|
||||
}
|
||||
|
||||
|
||||
export default CanvasImageReplay;
|
||||
export default CanvasImageBuilder;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/Replay
|
||||
* @module ol/render/canvas/InstructionsBuilder
|
||||
*/
|
||||
import {equals, reverseSubArray} from '../../array.js';
|
||||
import {asColorLike} from '../../colorlike.js';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/Replay
|
||||
* @module ol/render/canvas/InstructionsExecutor
|
||||
*/
|
||||
import {getUid} from '../../util.js';
|
||||
import {equals, reverseSubArray} from '../../array.js';
|
||||
@@ -52,7 +52,7 @@ const tmpExtent = createEmpty();
|
||||
const tmpTransform = createTransform();
|
||||
|
||||
|
||||
class InstructionsExecutor {
|
||||
class CanvasInstructionsExecutor {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -1344,7 +1344,7 @@ class InstructionsExecutor {
|
||||
}
|
||||
|
||||
|
||||
export default InstructionsExecutor;
|
||||
export default CanvasInstructionsExecutor;
|
||||
|
||||
|
||||
/////////////// Below is code copied from TextReplay /////////////////
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/ReplayGroup
|
||||
* @module ol/render/canvas/InstructionsGroupBuilder
|
||||
*/
|
||||
|
||||
import {numberSafeCompareFunction} from '../../array.js';
|
||||
@@ -10,10 +10,10 @@ import {isEmpty} from '../../obj.js';
|
||||
import ReplayGroup from '../ReplayGroup.js';
|
||||
import ReplayType from '../ReplayType.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import CanvasImageReplay from './ImageBuilder.js';
|
||||
import CanvasLineStringReplay from './LineStringBuilder.js';
|
||||
import CanvasPolygonReplay from './PolygonBuilder.js';
|
||||
import CanvasTextReplay from './TextBuilder.js';
|
||||
import CanvasImageBuilder from './ImageBuilder.js';
|
||||
import CanvasLineStringBuilder from './LineStringBuilder.js';
|
||||
import CanvasPolygonBuilder from './PolygonBuilder.js';
|
||||
import CanvasTextBuilder from './TextBuilder.js';
|
||||
import {ORDER} from '../replay.js';
|
||||
import {create as createTransform, compose as composeTransform} from '../../transform.js';
|
||||
|
||||
@@ -22,16 +22,16 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
* @type {Object<ReplayType, typeof CanvasInstructionsBuilder>}
|
||||
*/
|
||||
const BATCH_CONSTRUCTORS = {
|
||||
'Circle': CanvasPolygonReplay,
|
||||
'Circle': CanvasPolygonBuilder,
|
||||
'Default': CanvasInstructionsBuilder,
|
||||
'Image': CanvasImageReplay,
|
||||
'LineString': CanvasLineStringReplay,
|
||||
'Polygon': CanvasPolygonReplay,
|
||||
'Text': CanvasTextReplay
|
||||
'Image': CanvasImageBuilder,
|
||||
'LineString': CanvasLineStringBuilder,
|
||||
'Polygon': CanvasPolygonBuilder,
|
||||
'Text': CanvasTextBuilder
|
||||
};
|
||||
|
||||
|
||||
class CanvasReplayGroup extends ReplayGroup {
|
||||
class CanvasInstructionsGroupBuilder extends ReplayGroup {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Max extent.
|
||||
@@ -528,4 +528,4 @@ export function replayDeclutter(declutterReplays, context, rotation, snapToPixel
|
||||
}
|
||||
|
||||
|
||||
export default CanvasReplayGroup;
|
||||
export default CanvasInstructionsGroupBuilder;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/ReplayGroup
|
||||
* @module ol/render/canvas/InstructionsGroupExecutor
|
||||
*/
|
||||
|
||||
import {numberSafeCompareFunction} from '../../array.js';
|
||||
@@ -11,7 +11,7 @@ import ReplayGroup from '../ReplayGroup.js';
|
||||
import ReplayType from '../ReplayType.js';
|
||||
import {ORDER} from '../replay.js';
|
||||
import {create as createTransform, compose as composeTransform} from '../../transform.js';
|
||||
import InstructionsExecutor from './InstructionsExecutor.js';
|
||||
import CanvasInstructionsExecutor from './InstructionsExecutor.js';
|
||||
|
||||
|
||||
class InstructionsGroupExectuor extends ReplayGroup {
|
||||
@@ -311,7 +311,7 @@ class InstructionsGroupExectuor extends ReplayGroup {
|
||||
}
|
||||
let replay = replays[replayType];
|
||||
if (replay === undefined) {
|
||||
replay = new InstructionsExecutor(this.tolerance_, this.maxExtent_,
|
||||
replay = new CanvasInstructionsExecutor(this.tolerance_, this.maxExtent_,
|
||||
this.resolution_, this.pixelRatio_, this.overlaps_, this.declutterTree_);
|
||||
replays[replayType] = replay;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/**
|
||||
* @module ol/render/canvas/LineStringReplay
|
||||
* @module ol/render/canvas/LineStringBuilder
|
||||
*/
|
||||
import CanvasInstruction, {strokeInstruction, beginPathInstruction} from './Instruction.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
|
||||
class CanvasLineStringReplay extends CanvasInstructionsBuilder {
|
||||
class CanvasLineStringBuilder extends CanvasInstructionsBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -115,4 +115,4 @@ class CanvasLineStringReplay extends CanvasInstructionsBuilder {
|
||||
}
|
||||
|
||||
|
||||
export default CanvasLineStringReplay;
|
||||
export default CanvasLineStringBuilder;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/PolygonReplay
|
||||
* @module ol/render/canvas/PolygonBuilder
|
||||
*/
|
||||
import {asString} from '../../color.js';
|
||||
import {snap} from '../../geom/flat/simplify.js';
|
||||
@@ -10,7 +10,7 @@ import CanvasInstruction, {
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
|
||||
|
||||
class CanvasPolygonReplay extends CanvasInstructionsBuilder {
|
||||
class CanvasPolygonBuilder extends CanvasInstructionsBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -212,4 +212,4 @@ class CanvasPolygonReplay extends CanvasInstructionsBuilder {
|
||||
}
|
||||
|
||||
|
||||
export default CanvasPolygonReplay;
|
||||
export default CanvasPolygonBuilder;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/TextReplay
|
||||
* @module ol/render/canvas/TextBuilder
|
||||
*/
|
||||
import {getUid} from '../../util.js';
|
||||
import {asColorLike} from '../../colorlike.js';
|
||||
@@ -14,7 +14,7 @@ import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import {TEXT_ALIGN} from '../replay.js';
|
||||
import TextPlacement from '../../style/TextPlacement.js';
|
||||
|
||||
class CanvasTextReplay extends CanvasInstructionsBuilder {
|
||||
class CanvasTextBuilder extends CanvasInstructionsBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -547,4 +547,4 @@ export function measureTextWidths(font, lines, widths) {
|
||||
}
|
||||
|
||||
|
||||
export default CanvasTextReplay;
|
||||
export default CanvasTextBuilder;
|
||||
|
||||
Reference in New Issue
Block a user