Skip to content

Documentation / @geoverse/editor-core / CombineLinesCommand

Class: CombineLinesCommand

Defined in: packages/editor-core/src/commands/combineLines.ts:17

线组合多线(N→1,得 MultiLineString):把多条线(LineString/MultiLineString)合并为一个 MultiLineString,不要求端点相接(与 MergeLinesCommand 的拓扑相接合并区分)。 是「不相邻线」的多线归并,结果继承第一条的属性。

Implements

Constructors

Constructor

ts
new CombineLinesCommand(ids): CombineLinesCommand;

Defined in: packages/editor-core/src/commands/combineLines.ts:23

Parameters

ids

string[]

Returns

CombineLinesCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: packages/editor-core/src/commands/combineLines.ts:19

适用的几何类型(声明式);命令在 plan() 开头用 assertApplicable 据此硬拦截。

Implementation of

Command.appliesTo


label

ts
readonly label: "线组合多线" = '线组合多线';

Defined in: packages/editor-core/src/commands/combineLines.ts:18

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/combineLines.ts:25

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan