Skip to content

Documentation / @geoverse/editor-core / AddVertexCommand

Class: AddVertexCommand

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

添加节点(线/面,1→1,仅 modified)。

Implements

Constructors

Constructor

ts
new AddVertexCommand(
   id, 
   ref, 
   at): AddVertexCommand;

Defined in: packages/editor-core/src/commands/addVertex.ts:22

Parameters

id

string

ref

SegmentRef

at

Position

Returns

AddVertexCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

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

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

Implementation of

Command.appliesTo


label

ts
readonly label: "添加节点" = '添加节点';

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

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/addVertex.ts:28

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan