Skip to content

Commit

Permalink
docs: add note for immutable layout fields (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Herman <[email protected]>
  • Loading branch information
GeekyEggo and GeekyEggo authored Oct 29, 2024
1 parent a2f7ebb commit 156a38d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/streamdeck/plugins/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ type LayoutItemBase<T extends string> = {

/**
* Unique name used to identify the layout item. When calling `setFeedback` this value should be used as the key as part of the object that represents the feedback.
*
* Note: The `key` of the layout item cannot be changed at runtime.
* @pattern
* ^[A-Za-z0-9\-_]+$
* @errorMessage
Expand All @@ -62,11 +64,15 @@ type LayoutItemBase<T extends string> = {
/**
* Array defining the items coordinates in the format `[x, y, width, height]`; coordinates must be within canvas size of 200 x 100, e.g. [0, 0, 200, 100]. Items with the same `zOrder`
* must **not** have an overlapping `rect`.
*
* Note: The `rect` of the layout item cannot be changed at runtime.
*/
rect: Rect;

/**
* Type of layout item this instance represents, e.g. "pixmap", "bar", etc.
*
* Note: The `type` of the layout item cannot be changed at runtime.
*/
type: T;

Expand Down

0 comments on commit 156a38d

Please sign in to comment.