Final renamings
This commit is contained in:
@@ -11,7 +11,7 @@ class ExecutorGroup {
|
||||
* @abstract
|
||||
* @param {number|undefined} zIndex Z index.
|
||||
* @param {import("./ReplayType.js").default} replayType Replay type.
|
||||
* @return {import("./VectorContext.js").default} Replay.
|
||||
* @return {import("./VectorContext.js").default} Executor.
|
||||
*/
|
||||
getExecutor(zIndex, replayType) {
|
||||
return abstract();
|
||||
@@ -25,9 +25,16 @@ class ExecutorGroup {
|
||||
return abstract();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {import("../extent.js").Extent} The extent of the group.
|
||||
*/
|
||||
getMaxExtent() {
|
||||
return abstract();
|
||||
}
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {boolean} group Group with previous replay
|
||||
* @param {boolean} group Group with previous executor
|
||||
* @return {Array<*>} The resulting instruction group
|
||||
*/
|
||||
addDeclutter(group) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/InstructionsBuilder
|
||||
* @module ol/render/canvas/Builder
|
||||
*/
|
||||
import {equals, reverseSubArray} from '../../array.js';
|
||||
import {asColorLike} from '../../colorlike.js';
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
*/
|
||||
|
||||
|
||||
class CanvasInstructionsBuilder extends VectorContext {
|
||||
class CanvasBuilder extends VectorContext {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -464,7 +464,7 @@ class CanvasInstructionsBuilder extends VectorContext {
|
||||
|
||||
/**
|
||||
* @param {import("../canvas.js").FillStrokeState} state State.
|
||||
* @param {function(this:CanvasInstructionsBuilder, import("../canvas.js").FillStrokeState, (import("../../geom/Geometry.js").default|import("../Feature.js").default)):Array<*>} createFill Create fill.
|
||||
* @param {function(this:CanvasBuilder, import("../canvas.js").FillStrokeState, (import("../../geom/Geometry.js").default|import("../Feature.js").default)):Array<*>} createFill Create fill.
|
||||
* @param {import("../../geom/Geometry.js").default|import("../Feature.js").default} geometry Geometry.
|
||||
*/
|
||||
updateFillStyle(state, createFill, geometry) {
|
||||
@@ -479,7 +479,7 @@ class CanvasInstructionsBuilder extends VectorContext {
|
||||
|
||||
/**
|
||||
* @param {import("../canvas.js").FillStrokeState} state State.
|
||||
* @param {function(this:CanvasInstructionsBuilder, import("../canvas.js").FillStrokeState)} applyStroke Apply stroke.
|
||||
* @param {function(this:CanvasBuilder, import("../canvas.js").FillStrokeState)} applyStroke Apply stroke.
|
||||
*/
|
||||
updateStrokeStyle(state, applyStroke) {
|
||||
const strokeStyle = state.strokeStyle;
|
||||
@@ -543,4 +543,4 @@ class CanvasInstructionsBuilder extends VectorContext {
|
||||
}
|
||||
|
||||
|
||||
export default CanvasInstructionsBuilder;
|
||||
export default CanvasBuilder;
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/InstructionsGroupBuilder
|
||||
* @module ol/render/canvas/BuilderGroup
|
||||
*/
|
||||
|
||||
import {numberSafeCompareFunction} from '../../array.js';
|
||||
@@ -9,7 +9,7 @@ import {transform2D} from '../../geom/flat/transform.js';
|
||||
import {isEmpty} from '../../obj.js';
|
||||
import BuilderGroup from '../BuilderGroup.js';
|
||||
import ReplayType from '../ReplayType.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import CanvasBuilder from './Builder.js';
|
||||
import CanvasImageBuilder from './ImageBuilder.js';
|
||||
import CanvasLineStringBuilder from './LineStringBuilder.js';
|
||||
import CanvasPolygonBuilder from './PolygonBuilder.js';
|
||||
@@ -19,11 +19,11 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object<ReplayType, typeof CanvasInstructionsBuilder>}
|
||||
* @type {Object<ReplayType, typeof CanvasBuilder>}
|
||||
*/
|
||||
const BATCH_CONSTRUCTORS = {
|
||||
'Circle': CanvasPolygonBuilder,
|
||||
'Default': CanvasInstructionsBuilder,
|
||||
'Default': CanvasBuilder,
|
||||
'Image': CanvasImageBuilder,
|
||||
'LineString': CanvasLineStringBuilder,
|
||||
'Polygon': CanvasPolygonBuilder,
|
||||
@@ -102,7 +102,7 @@ class CanvasBuilderGroup extends BuilderGroup {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object<string, !Object<ReplayType, CanvasInstructionsBuilder>>}
|
||||
* @type {!Object<string, !Object<ReplayType, CanvasBuilder>>}
|
||||
*/
|
||||
this.buildersByZIndex_ = {};
|
||||
|
||||
@@ -151,7 +151,7 @@ class CanvasBuilderGroup extends BuilderGroup {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {!Object<string, !Object<ReplayType, import("./InstructionsBuilder.js").SerializableInstructions>>} The serializable instructions
|
||||
* @return {!Object<string, !Object<ReplayType, import("./Builder.js").SerializableInstructions>>} The serializable instructions
|
||||
*/
|
||||
finish() {
|
||||
const builderInstructions = {};
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @module ol/render/canvas/InstructionsExecutor
|
||||
* @module ol/render/canvas/Executor
|
||||
*/
|
||||
import {getUid} from '../../util.js';
|
||||
import {equals, reverseSubArray} from '../../array.js';
|
||||
@@ -47,7 +47,7 @@ const tmpExtent = createEmpty();
|
||||
const tmpTransform = createTransform();
|
||||
|
||||
|
||||
class CanvasInstructionsExecutor {
|
||||
class CanvasExecutor {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
@@ -1019,4 +1019,4 @@ class CanvasInstructionsExecutor {
|
||||
}
|
||||
|
||||
|
||||
export default CanvasInstructionsExecutor;
|
||||
export default CanvasExecutor;
|
||||
@@ -11,7 +11,7 @@ import BaseExecutorGroup from '../ExecutorGroup.js';
|
||||
import ReplayType from '../ReplayType.js';
|
||||
import {ORDER} from '../replay.js';
|
||||
import {create as createTransform, compose as composeTransform} from '../../transform.js';
|
||||
import CanvasInstructionsExecutor from './InstructionsExecutor.js';
|
||||
import CanvasExecutor from './Executor.js';
|
||||
|
||||
|
||||
class ExecutorGroup extends BaseExecutorGroup {
|
||||
@@ -85,7 +85,7 @@ class ExecutorGroup extends BaseExecutorGroup {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object<string, !Object<ReplayType, import("./InstructionsExecutor").default>>}
|
||||
* @type {!Object<string, !Object<ReplayType, import("./Executor").default>>}
|
||||
*/
|
||||
this.executorsByZIndex_ = {};
|
||||
|
||||
@@ -118,7 +118,7 @@ class ExecutorGroup extends BaseExecutorGroup {
|
||||
|
||||
/**
|
||||
* Create executors and populate them using the provided instructions.
|
||||
* @param {!Object<string, !Object<ReplayType, import("./InstructionsBuilder.js").SerializableInstructions>>} allInstructions The serializable instructions
|
||||
* @param {!Object<string, !Object<ReplayType, import("./Builder.js").SerializableInstructions>>} allInstructions The serializable instructions
|
||||
*/
|
||||
replaceInstructions(allInstructions) {
|
||||
this.executorsByZIndex_ = {};
|
||||
@@ -301,7 +301,7 @@ class ExecutorGroup extends BaseExecutorGroup {
|
||||
}
|
||||
let executor = executors[replayType];
|
||||
if (executor === undefined) {
|
||||
executor = new CanvasInstructionsExecutor(this.tolerance_, this.maxExtent_,
|
||||
executor = new CanvasExecutor(this.tolerance_, this.maxExtent_,
|
||||
this.resolution_, this.pixelRatio_, this.overlaps_, this.declutterTree_);
|
||||
executors[replayType] = executor;
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* @module ol/render/canvas/ImageBuilder
|
||||
*/
|
||||
import CanvasInstruction from './Instruction.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import CanvasBuilder from './Builder.js';
|
||||
|
||||
class CanvasImageBuilder extends CanvasInstructionsBuilder {
|
||||
class CanvasImageBuilder extends CanvasBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* @module ol/render/canvas/LineStringBuilder
|
||||
*/
|
||||
import CanvasInstruction, {strokeInstruction, beginPathInstruction} from './Instruction.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import CanvasBuilder from './Builder.js';
|
||||
|
||||
class CanvasLineStringBuilder extends CanvasInstructionsBuilder {
|
||||
class CanvasLineStringBuilder extends CanvasBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
|
||||
@@ -7,10 +7,10 @@ import {defaultFillStyle} from '../canvas.js';
|
||||
import CanvasInstruction, {
|
||||
fillInstruction, strokeInstruction, beginPathInstruction, closePathInstruction
|
||||
} from './Instruction.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import CanvasBuilder from './Builder.js';
|
||||
|
||||
|
||||
class CanvasPolygonBuilder extends CanvasInstructionsBuilder {
|
||||
class CanvasPolygonBuilder extends CanvasBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
|
||||
@@ -8,11 +8,11 @@ import {matchingChunk} from '../../geom/flat/straightchunk.js';
|
||||
import GeometryType from '../../geom/GeometryType.js';
|
||||
import {labelCache, defaultTextAlign, defaultPadding, defaultLineCap, defaultLineDashOffset, defaultLineDash, defaultLineJoin, defaultFillStyle, checkFont, defaultFont, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline} from '../canvas.js';
|
||||
import CanvasInstruction from './Instruction.js';
|
||||
import CanvasInstructionsBuilder from './InstructionsBuilder.js';
|
||||
import CanvasBuilder from './Builder.js';
|
||||
import {TEXT_ALIGN} from '../replay.js';
|
||||
import TextPlacement from '../../style/TextPlacement.js';
|
||||
|
||||
class CanvasTextBuilder extends CanvasInstructionsBuilder {
|
||||
class CanvasTextBuilder extends CanvasBuilder {
|
||||
/**
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {import("../../extent.js").Extent} maxExtent Maximum extent.
|
||||
|
||||
Reference in New Issue
Block a user