ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
Returns a flag indicating if the movable is selected.
Scroll the movable into the viewport.
Optionaloptions: boolean | ScrollIntoViewOptionsA promise that resolve to a boolean when the scroll is complete.
Remove the movable the current selection.
A flag indicating if it was previously in the selection.
Add Listeners.
Optionaloptions: IListener.OptionsBatches 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.
Similar to delete but cleans resources and can't be undone.
Deletes the content, which removes this movable. The same as getContent().delete().
Provides 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.
OptionalgetReturns the movable's unrotated frame in pixels, or null if not yet laid out.
The frame is the box the movable is drawn in before it is turned by getRotation, about its center. A rotated movable is anchored to the cells of the box it occupies as rotated, which Excel takes to be the frame with its width and height swapped when the rotation is within 45° of 90° or 270°, and the frame itself otherwise.
Returns the content of the movable: what is drawn at this position.
The content's getType() says which interface to read it as:
getType() |
content |
|---|---|
'picture' |
IPicture |
'chart' |
IChart |
'shape' |
IShape — text boxes, callouts and connectors |
'group' |
IGroup — a group of movables, each a member with its own content |
'slicer' |
ISlicer |
'checkBox', 'button', 'scrollBar', … |
IFormControl — a form control, one type per kind (IFormControl.Type) |
A host adds kinds of its own through MovableContentRegistry. Anything else is content that is positioned and saved but not modeled; it answers IMovable.IContent and nothing more.
The content owns what identifies it: its name, its description and its id. The movable owns where it is drawn. To remove both, delete the content.
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.
The movables this one holds, in z-order (the first is drawn first), or null when its content
holds none.
A group's movable holds its members. As on a sheet (ISheet.getMovables), adding to the collection places a movable here, at canvas bounds; deleting a member's content takes it out. Each member's getParent is this movable.
OptionalgetThe name of the anchor or null if it has none.
Returns the movable that holds this one, or null at the root: the movable whose
getMovables lists it.
A member's getBounds, getRotation and getFlip are where it is drawn on the canvas, as any movable's are: what holds it hands it, when it is made, the mapping between the space its placement is kept in (a group's child space, as the file states it) and where the holder is drawn, so a member is read and edited like a root and nothing walks the chain. A member's placement changes with every movable above it, and announces IMovable.Events.onBoundsChange when it does.
Returns the range this movable is anchored to.
Optionaloptions: ICellRange.GetRangeOptionsA movable occupies exactly one rectangle, which is why the singular lives here rather than on
IAnchored. Invalid, never null, once the movable is no longer anchored.
Returns the ranges this object is anchored to, in authored order.
Optionaloptions: ICellRange.GetRangeOptionsnull. An item whose last range was removed by a row/column delete returns an
invalid ranges — ask ICellRanges.isInvalid, the same contract as
ITable.getDataRange.getRange() for it, but data validations, conditional formats and protected ranges are
authored as several, and any single range can become several when a delete splits it.Represents an immutable reference to an ICellRange, capturing its content and metadata.
It may include complex objects such as tables, shapes, images, listeners, or other items.
Optionaloptions: CopyOptionsEvery 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.
The order in the z plane. To adjust this use the move methods.
Returns if the model has been closed
Whether the content is the kind's own, rather than a stand-in for a kind still loading.
A kind registered with a loader (MovableContentRegistry.Lazy) is fetched the first
time a workbook holds one. Until it arrives, getContent answers a stand-in that has
the kind's type, name and description, saves as it was read, and is read-only. Reading a
workbook (IWorkbookIO.read) and IMovableCollection.add wait for the load, so
this is only ever false for a workbook built directly from JSON.
Returns if the model has been deleted
If the anchor is unable to be modified.
Move movable backward one layer in the zIndex.
Move movable forward one layer in the zIndex.
Move movable to the back in the zIndex.
Move movable to the font in the zIndex.
Selects the current movable.
Optionaloptions: IMovable.SelectOptionsAn async boolean indicating the movable was selected.
Set the position and size of the movable's unrotated frame, in pixels.
The new bounds.
Optionaloptions: ITransaction.OperationOptionsIf only some of the points are provided then only those will be moved. The frame is what getBounds returns; the cells the movable is anchored to follow from it and the rotation.
Mirror the content within its frame, left to right and/or top to bottom.
The axes to set; an axis left out keeps its value.
Optionaloptions: ITransaction.OperationOptionsThe frame keeps its position, size and rotation: a flip is applied in the frame's own axes, before the turn, as in Excel. Whether the content can be mirrored is the content's to say (IMovable.IContent.acceptFlip); a chart cannot, and ignores it.
If true then the aspect should be maintained during resize if using the corners or if the api only specifies one dimension.
OptionaltoResolves with the content once its kind has loaded: at once when it already has, and with the stand-in when the load fails.
Capabilities for working with graphical elements that can be arbitrarily placed (floated) within a virtual 'canvas'.
Encompasses objects like images, charts, shapes, and custom widgets.
Key features include: