Skip to main content

sdk.rotateobjectparams

Home > @kittl/sdk > RotateObjectParams

RotateObjectParams interface

Parameters for rotating object.

Signature:

export interface RotateObjectParams 

Properties

Property

Modifiers

Type

Description

angle

number

The absolute angle to set for the object in degrees. Positive values rotate clockwise, negative values rotate counter-clockwise. This will replace the object's current angle property.

id

string

Unique identifier of the object to rotate. This can be the ID of any design object (text, image, shape, group, etc.).

origin?

{ x: [OriginX](./sdk.originx.mdx)<!-- -->; y: [OriginY](./sdk.originy.mdx)<!-- -->; }

(Optional) Origin point for rotation transformation. Specifies the anchor point around which the object rotates.

**Default:** { x: 'center', y: 'center' } - object rotates around its center

**Origin Options:** - x: 'left' | 'center' | 'right' - horizontal anchor point - y: 'top' | 'center' | 'bottom' - vertical anchor point

**Examples:** - { x: 'center', y: 'center' } - rotates around the center (default) - { x: 'left', y: 'top' } - rotates around the top-left corner - { x: 'right', y: 'bottom' } - rotates around the bottom-right corner