ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
OptionalacceptThe flip this content takes when asked to mirror as flip states.
Defined by content that can be mirrored, such as a shape or a picture; absent, the content cannot: a frame dragged through its opposite edge is moved there but not mirrored, as Excel does with a chart. Must be pure, as acceptRotation is. A connector may accept each axis on its own.
OptionalacceptThe rotation this content takes when asked to turn by degrees, clockwise.
Add Listeners.
Batches all 'transactional' changes until they have all be committed or rolled back.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
Any changes that are made to this object will be reflected in the local record but not committed to the transactional store until the batch is popped.
Useful for operations that are longer running but generally not recommended as it keeps a transaction open. doBatch is the preferred option.
Close the record and cleans resources. Can't be undone.
Deletes the shape, and with it the movable that places it.
Optionaloptions: ITransaction.OperationOptionsProvides a mechanism to perform a set of operations in a batch.
A callback that performs multiple operations all within the same transaction.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
Returns the adjust values set on this shape, by name.
A preset's handles move its adjust values — how rounded a roundRect is, where a callout
points. Only values that differ from the preset's defaults are stored.
The values are the geometry definition's own numbers (a ratio in 100,000ths, an angle in 60,000ths of a degree), opaque to a caller: a handle drag produces them through IGeometry.adjustmentsFromHandle, and a file reads and writes them as they are.
Returns the alternative text used by assistive technologies, or null if none has been set.
Evaluates the shape's geometry at a size.
Optionalwidth: number
Width in pixels.
Optionalheight: number
Height in pixels.
null for a shape whose preset is unknown, or a shape with no size. A custom
geometry evaluates like a preset, from its own definition.
What evaluates a shape loads on first use, and only what that shape needs, so this is asynchronous; a workbook with no shapes loads none of it. Everything on the geometry it returns is synchronous, including evaluating it again at another size or with other adjust values. Paths, handles and sites are in sheet pixels, in the shape's own frame (its top-left is 0,0), which is how the movable layer draws them.
An open path takes the line ends the shape's line declares (its own over its theme style's): its stroke is trimmed under them, and they are visited as IGeometry.PathLayer.Marker paths.
A unique identifier for the record. This will never change.
This enables the record to be identified across transactions and users in a collaborative environment. The id is store-issued (IStore.create); the store keys all state by it.
Returns the movable that places the content on the sheet, or null if it is not placed by
one.
Returns the name of the shape.
Returns the kind of shape this is: its preset geometry.
A DrawingML preset id (IGeometry.Preset) — rect, borderCallout2, curvedConnector3 —
or 'custom' for a shape drawn from its own path. A file may name a preset this SDK does not
know; it is returned as the file states it.
The preset says what a shape is for where its name does not: a callout annotates something, a connector links two shapes, and a rectangle with no text is usually a box drawn around the cells under it.
Returns the text written on the shape.
null when the shape has no text body at all, as a connector does not. A shape that
can hold text but has none answers with a frame whose text is ''.
Returns an immutable type string.
Returns a label for the kind of content, such as Chart or Picture.
Every committed update gives the record a new, strictly increasing version id.
Used with getId to uniquely identify a version of the record.
The id is an identity, not a per-record count: ids are drawn from a single store-wide sequence bumped once per commit, so all records written in the same commit share an id and a given record's ids increase but are not sequential.
Records are immutable so a restore/revert doesn't change them — it repoints, and the version id reported is the one for the snapshot the store is currently at. Version ids are never reused: a write after an undo receives an id higher than any previously issued, so a stale reader can always detect the change.
Returns true if no more operations are allowed.
If the model unable to be modified.
If the model unable to be modified.
Sets the adjust values, replacing any already set.
Values by name, as IGeometry.adjustmentsFromHandle returns them;
null restores the preset's defaults. Names the preset does not declare are kept but have no
effect.
Optionaloptions: ITransaction.OperationOptionsSet the alternative text used by assistive technologies.
OptionalsetSet the name.
The name of the content.
A drawn shape: a text box, a callout, a rectangle, a connector.
Remarks
A shape is the content of an IMovable —
movable.getContent<IShape>()for a movable whose content type is'shape'. The movable carries the position; the shape carries what is drawn there and what is written on it. A group of shapes is an IGroup, whose members are movables of their own.Reading, and adjust values: a shape is JSON (IShape.JSON) that a file reads into and writes from; the editing API beyond
setAdjustmentsis still to come.