Skip to content

Documentation / @geoverse/editor-core / MoveVertexCommand

Class: MoveVertexCommand

Defined in: packages/editor-core/src/commands/moveVertex.ts:54

移动单个顶点(1→1,仅产生 modified)。

Implements

Constructors

Constructor

ts
new MoveVertexCommand(
   targetId, 
   ref, 
   to): MoveVertexCommand;

Defined in: packages/editor-core/src/commands/moveVertex.ts:57

Parameters

targetId

string

ref

VertexRef

to

Position

Returns

MoveVertexCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: packages/editor-core/src/commands/moveVertex.ts:56

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

Implementation of

Command.appliesTo


label

ts
readonly label: "移动顶点" = '移动顶点';

Defined in: packages/editor-core/src/commands/moveVertex.ts:55

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: packages/editor-core/src/commands/moveVertex.ts:63

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan