Skip to content

Documentation / @geoverse/editor-core / MergeLinesCommand

Class: MergeLinesCommand ​

Defined in: packages/editor-core/src/commands/mergeLines.ts:15

合并端点相接的折线(N→1,按给定顺序依次相接)。新要素继承第一条的属性。

Implements ​

Constructors ​

Constructor ​

ts
new MergeLinesCommand(...ids): MergeLinesCommand;

Defined in: packages/editor-core/src/commands/mergeLines.ts:20

Parameters ​

ids ​

...string[]

Returns ​

MergeLinesCommand

Properties ​

appliesTo ​

ts
readonly appliesTo: readonly GeometryKind[];

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

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

Implementation of ​

Command.appliesTo


label ​

ts
readonly label: "合并" = '合并';

Defined in: packages/editor-core/src/commands/mergeLines.ts:16

Implementation of ​

Command.label

Methods ​

plan() ​

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/mergeLines.ts:24

Parameters ​

ctx ​

EditContext

Returns ​

ChangeSet

Implementation of ​

Command.plan