Skip to content

Documentation / @geoverse/editor-core / MergePolygonsCommand

Class: MergePolygonsCommand ​

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

面合并(N→1,JSTS 稳健 union,处理共享边)。允许 Polygon/MultiPolygon 混合。

Implements ​

Constructors ​

Constructor ​

ts
new MergePolygonsCommand(ids): MergePolygonsCommand;

Defined in: packages/editor-core/src/commands/mergePolygons.ts:17

Parameters ​

ids ​

string[]

Returns ​

MergePolygonsCommand

Properties ​

appliesTo ​

ts
readonly appliesTo: readonly GeometryKind[];

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

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

Implementation of ​

Command.appliesTo


label ​

ts
readonly label: "面合并" = '面合并';

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

Implementation of ​

Command.label

Methods ​

plan() ​

ts
plan(ctx): ChangeSet;

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

Parameters ​

ctx ​

EditContext

Returns ​

ChangeSet

Implementation of ​

Command.plan