Skip to content

Documentation / @geoverse/editor-core / AddFeatureCommand

Class: AddFeatureCommand ​

Defined in: packages/editor-core/src/commands/addFeature.ts:5

新增要素(0→1,仅 added)。几何由适配器的绘制交互产出(点/线/面)。

Implements ​

Constructors ​

Constructor ​

ts
new AddFeatureCommand(
   geometry, 
   properties?, 
   label?): AddFeatureCommand;

Defined in: packages/editor-core/src/commands/addFeature.ts:7

Parameters ​

geometry ​

Geometry

properties? ​

Record<string, unknown> = {}

label? ​

string = '新增要素'

Returns ​

AddFeatureCommand

Properties ​

label ​

ts
readonly label: string;

Defined in: packages/editor-core/src/commands/addFeature.ts:6

Implementation of ​

Command.label

Methods ​

plan() ​

ts
plan(ctx): ChangeSet;

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

Parameters ​

ctx ​

EditContext

Returns ​

ChangeSet

Implementation of ​

Command.plan