Skip to content

Documentation / @geoverse/editor-core / SplitLineCommand

Class: SplitLineCommand

Defined in: packages/editor-core/src/commands/splitLine.ts:13

打断折线(1→2)。

Implements

Constructors

Constructor

ts
new SplitLineCommand(targetId, at): SplitLineCommand;

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

Parameters

targetId

string

at

Position

Returns

SplitLineCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

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

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

Implementation of

Command.appliesTo


label

ts
readonly label: "打断" = '打断';

Defined in: packages/editor-core/src/commands/splitLine.ts:14

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/splitLine.ts:21

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan