Object API Reference
kittl.design.object — generic object utilities.
Scope: design:state:read (read methods) · design:state:write (mutations)
getObject(params)
Retrieves a design object by ID.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the object to retrieve |
Returns: SdkResultAsync<NormalizedObject>
setLockedState(params)
Locks or unlocks an object.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Object ID |
locked | boolean | Yes | true to lock, false to unlock |
setHiddenState(params)
Shows or hides an object.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Object ID |
hidden | boolean | Yes | true to hide, false to show |
rotateObject(params)
Rotates an object by a relative angle.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Object ID |
angle | number | Yes | Degrees to rotate (positive = clockwise) |
origin | { x: OriginX, y: OriginY } | No | Rotation origin (default: { x: 'center', y: 'center' }) |
removeObject(params)
Removes an object from the design.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the object to remove |
getAllByFilter(predicate)
Returns all objects matching a predicate function.
| Parameter | Type | Description |
|---|---|---|
predicate | (object: NormalizedObject) => boolean | Filter function |
Returns: SdkResultAsync<NormalizedObject[]>
rename(params)
Renames an object.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Object ID |
name | string | Yes | New name |