Skip to content

Documentation / @geoverse/editor-core / SetGeometryCommand

Class: SetGeometryCommand

Defined in: packages/editor-core/src/commands/setGeometry.ts:9

整体替换某要素几何(1→1,仅 modified)。 适配 ol/interaction/Modify 这类"一次给出整条新几何"的交互—— 适配器无需逐顶点 diff,直接把改完的几何交给本命令。

Implements

Constructors

Constructor

ts
new SetGeometryCommand(
   targetId, 
   after, 
   label?): SetGeometryCommand;

Defined in: packages/editor-core/src/commands/setGeometry.ts:11

Parameters

targetId

string

after

Geometry

label?

string = '编辑几何'

Returns

SetGeometryCommand

Properties

label

ts
readonly label: string;

Defined in: packages/editor-core/src/commands/setGeometry.ts:10

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

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

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan