Skip to content

Documentation / @geoverse/editor-core / SplitPolygonByLineCommand

Class: SplitPolygonByLineCommand

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

按线拆面 / 面拆分(1→N,JSTS)。切割线由适配器交互产出。

Implements

Constructors

Constructor

ts
new SplitPolygonByLineCommand(targetId, line): SplitPolygonByLineCommand;

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

Parameters

targetId

string

line

LineString

Returns

SplitPolygonByLineCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

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

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

Implementation of

Command.appliesTo


label

ts
readonly label: "面拆分" = '面拆分';

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

Implementation of

Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

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

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

Command.plan