Appearance
Documentation / @geoverse/editor-core / TranslateCommand
Class: TranslateCommand
Defined in: packages/editor-core/src/commands/translate.ts:21
移动要素(平移,N 个,全几何类型,仅 modified)。dx/dy 为工作 CRS 内的位移。
Implements
Constructors
Constructor
ts
new TranslateCommand(
ids,
dx,
dy): TranslateCommand;Defined in: packages/editor-core/src/commands/translate.ts:24
Parameters
ids
string[]
dx
number
dy
number
Returns
TranslateCommand
Properties
appliesTo
ts
readonly appliesTo: readonly GeometryKind[] = ALL_KINDS;Defined in: packages/editor-core/src/commands/translate.ts:23
适用的几何类型(声明式);命令在 plan() 开头用 assertApplicable 据此硬拦截。
Implementation of
label
ts
readonly label: "移动要素" = '移动要素';Defined in: packages/editor-core/src/commands/translate.ts:22
Implementation of
Methods
plan()
ts
plan(ctx): ChangeSet;Defined in: packages/editor-core/src/commands/translate.ts:30
