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): ShapeDataProxy
Parameters
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(): number
Returns
number
Methods
addInheritable()
addInheritable(name, value): void
Add 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): void
Delete 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 | SerializedDataError
Parameters
Parameter | Type |
---|---|
filter | (item , key ) => boolean |
Returns
SerializedFieldType
| SerializedDataError
Inherited from
first()
first(): SerializedFieldType | SerializedDataError
Returns
SerializedFieldType
| SerializedDataError
Inherited from
get()
get(key): SerializedFieldType | SerializedDataError
Parameters
Parameter | Type |
---|---|
key | string |
Returns
SerializedFieldType
| SerializedDataError
Inherited from
getString()
getString(key): string
Parameters
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): void
Parameters
Parameter | Type |
---|---|
key | string |
value | SerializedFieldType | SerializedDataError |
options | SetterOptions |
Returns
void
Inherited from
values()
values(): Generator<
| null
| string
| number
| boolean
| SerializedMillisecondsDateObject
| SerializedIsoDateObject
| SerializedTimeObject
| SerializedColorObjectFieldType
| NestedSerializedLucidDictionary
| JSONSerializedLucidDictionary
| SerializedLucidCurrency
| SerializedFieldType[]
| SerializedDataError, void, unknown>
Returns
Generator
<
| null
| string
| number
| boolean
| SerializedMillisecondsDateObject
| SerializedIsoDateObject
| SerializedTimeObject
| SerializedColorObjectFieldType
| NestedSerializedLucidDictionary
| JSONSerializedLucidDictionary
| SerializedLucidCurrency
| SerializedFieldType
[]
| SerializedDataError
, void
, unknown
>