Skip to content

Documentation / @geoverse/editor-ol / RotateCommand

Class: RotateCommand

Defined in: editor-core/dist/commands/transformCommands.d.ts:4

旋转要素(N 个,绕 origin 或选择集中心,deg 度逆时针)。

Implements

  • Command

Constructors

Constructor

ts
new RotateCommand(
   ids, 
   deg, 
   origin?): RotateCommand;

Defined in: editor-core/dist/commands/transformCommands.d.ts:10

Parameters

ids

string[]

deg

number

origin?

Position

Returns

RotateCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: editor-core/dist/commands/transformCommands.d.ts:9

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

Implementation of

ts
Command.appliesTo

label

ts
readonly label: "旋转要素" = "\u65CB\u8F6C\u8981\u7D20";

Defined in: editor-core/dist/commands/transformCommands.d.ts:8

Implementation of

ts
Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: editor-core/dist/commands/transformCommands.d.ts:11

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

ts
Command.plan