The shape data fields on a single element of the current document
Extends
WriteableMapProxy<string,SerializedFieldType|SerializedDataError,void>
Constructors
new ShapeDataProxy()
new ShapeDataProxy(id, client): ShapeDataProxyParameters
| Parameter | Type | Description |
|---|---|---|
id | undefined | string | The ID of the element, or undefined for the document itself |
client | EditorClient |
Returns
Overrides
Properties
client
protected readonly client: EditorClient;id
readonly id: undefined | string;The ID of the element, or undefined for the document itself
Accessors
size
get size(): numberReturns
number
Methods
addInheritable()
addInheritable(name, value): voidAdd shape data to this element that is inherited by its descendants.
If you add an inheritable shape data to a page, whose formula is "=@Cost * 4", then
each item on that page will have a new shape data entry (in allShapeData) by that
name with the value calculated in the context of that individual item.
Inheritable shape data on a page affects all items on the page. Inheritable shape
data on a group affects all items inside that group.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Name of the new shape data |
value | string | Value (or formula, if starting with "=") of the new shape data |
Returns
void
delete()
delete(key): voidDelete the specified shape data from this element
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string |
Returns
void
filter()
filter(filter): (SerializedFieldType | SerializedDataError)[]Parameters
| Parameter | Type |
|---|---|
filter | (item, key) => boolean |
Returns
(SerializedFieldType | SerializedDataError)[]
Inherited from
find()
find(filter): SerializedFieldType | SerializedDataErrorParameters
| Parameter | Type |
|---|---|
filter | (item, key) => boolean |
Returns
SerializedFieldType | SerializedDataError
Inherited from
first()
first(): SerializedFieldType | SerializedDataErrorReturns
SerializedFieldType | SerializedDataError
Inherited from
get()
get(key): SerializedFieldType | SerializedDataErrorParameters
| Parameter | Type |
|---|---|
key | string |
Returns
SerializedFieldType | SerializedDataError
Inherited from
getString()
getString(key): stringParameters
| Parameter | Type | Description |
|---|---|---|
key | string | Name of the shape data to read |
Returns
string
The value if it is a string, or an empty string if it does not exist or is not a string.
keys()
keys(): string[]Returns
string[]
Inherited from
map()
map<T>(callback): T[]Type parameters
| Type parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
callback | (item, key) => T |
Returns
T[]
Inherited from
set()
set(
key,
value,
options): voidParameters
| Parameter | Type |
|---|---|
key | string |
value | SerializedFieldType | SerializedDataError |
options | SetterOptions |
Returns
void
Inherited from
values()
values(): Generator<
| null
| string
| number
| boolean
| SerializedMillisecondsDateObject
| SerializedIsoDateObject
| SerializedLucidDateRangeObject
| SerializedTimeObject
| SerializedColorObjectFieldType
| NestedSerializedLucidDictionary
| JSONSerializedLucidDictionary
| SerializedLucidCurrency
| SerializedFieldType[]
| SerializedDataError, void, unknown>Returns
Generator<
| null
| string
| number
| boolean
| SerializedMillisecondsDateObject
| SerializedIsoDateObject
| SerializedLucidDateRangeObject
| SerializedTimeObject
| SerializedColorObjectFieldType
| NestedSerializedLucidDictionary
| JSONSerializedLucidDictionary
| SerializedLucidCurrency
| SerializedFieldType[]
| SerializedDataError, void, unknown>