Appearance
Documentation / @geoverse/editor-libre / TranslateCommand
Class: TranslateCommand
Defined in: editor-core/dist/commands/translate.d.ts:3
移动要素(平移,N 个,全几何类型,仅 modified)。dx/dy 为工作 CRS 内的位移。
Implements
Command
Constructors
Constructor
ts
new TranslateCommand(
ids,
dx,
dy): TranslateCommand;Defined in: editor-core/dist/commands/translate.d.ts:9
Parameters
ids
string[]
dx
number
dy
number
Returns
TranslateCommand
Properties
appliesTo
ts
readonly appliesTo: readonly GeometryKind[];Defined in: editor-core/dist/commands/translate.d.ts:8
适用的几何类型(声明式);命令在 plan() 开头用 assertApplicable 据此硬拦截。
Implementation of
ts
Command.appliesTolabel
ts
readonly label: "移动要素" = "\u79FB\u52A8\u8981\u7D20";Defined in: editor-core/dist/commands/translate.d.ts:7
Implementation of
ts
Command.labelMethods
plan()
ts
plan(ctx): ChangeSet;Defined in: editor-core/dist/commands/translate.d.ts:10
Parameters
ctx
EditContext
Returns
ChangeSet
Implementation of
ts
Command.plan