SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface AddOptions<J>

    Options for adding a movable to the collection.

    interface AddOptions<J = any> {
        anchorType?: IAnchored.Type;
        author?: Author;
        autoPlace?: "viewport";
        autoSelect?: boolean | IMovable.SelectOptions;
        bounds?: Partial<Bounds>;
        description?: string;
        expectedCommitId?: string;
        fromResourceId?: (resourceId: number) => IResource;
        json?: J;
        name?: string;
        readOnly?: boolean;
        rotation?: number;
        type?: string;
    }

    Type Parameters

    • J = any

    Hierarchy (View Summary)

    Index
    anchorType?: IAnchored.Type

    The behavior of how the movable resizes as the anchor/cells change.

    author?: Author

    Who authored this change. Recorded on the commit (ICommit.getAuthor).

    the store's author, else null (unattributed)

    autoPlace?: "viewport"

    Placement hint used only when bounds is omitted. 'viewport' centers the (default-sized) movable in the visible viewport via ISheet.IListeners.onRequestViewport, falling back to the default cursor placement when no viewport responds (headless). Omit ⇒ default cursor placement.

    autoSelect?: boolean | IMovable.SelectOptions

    If unspecified no selection will occur.

    Overrides the default autoSelect to include IMovable.SelectOptions options.

    bounds?: Partial<Bounds>

    The movable's unrotated frame in pixels (see IMovable.getBounds).

    description?: string

    A human description.

    'determined by the set operation and locale'
    
    expectedCommitId?: string

    Optimistic concurrency guard. If set, the operation only begins if the store's current commit id matches; otherwise a TransactionConflictError is thrown.

    The check happens atomically as the root transaction begins — there is no window between check and commit. If any transaction is already open the check fails with reason open (the head could move beneath the operation).

    fromResourceId?: (resourceId: number) => IResource

    If a referenceId is provided then the movable will be linked to the resource.

    Type Declaration

      • (resourceId: number): IResource
      • Parameters

        • resourceId: number

        Returns IResource

        IResource

    json?: J

    Initial json value.

    name?: string

    The name of the content.

    A name made from the type, such as Chart 3.

    readOnly?: boolean

    Declares the operation read-only: any state update within it throws.

    false
    

    Writes are tracked automatically — a batch that performs no updates never creates a commit (no new commit id, no events, no undo entry) whether or not this is set. The flag is purely an assertion for callers that want the guarantee enforced. Nested transactions inherit it; they cannot opt back out.

    rotation?: number

    The rotation in degrees, clockwise about the frame's center.

    0
    
    type?: string

    The type of movable to add.