Interface AnchoredDrawingOptions<J>

Options for adding a drawing object to a drawing container.

interface AnchoredDrawingOptions<J> {
    defaultLockAspectRatio?: boolean;
    fromResourceId?: ((resourceId) => ISharedResource);
    getMaxBounds?: (() => Bounds);
    getZIndex?: (() => number);
    initialAnchor: CellRangeCoords;
    isProtected: (() => boolean);
    jsonAnchor?: DrawingAnchorJSON<J>;
    moveBackwardOnContainer?: (() => void);
    moveForwardOnContainer?: (() => void);
    moveToBackOnContainer?: (() => void);
    moveToFrontOnContainer?: (() => void);
    resource?: ISharedResource;
    transactionStore?: TransactionStore;
    type: string;
    deleteFromContainer(): void;
    getRangeBounds(cellRangeCoords): Bounds;
    getRangeCoords(bounds): CellRangeCoords;
    setAnchorOnContainer(anchor): void;
    setContainerAnchorDeleteCallback?(callback): void;
    setContainerAnchorResizeCallback?(callback): void;
    setContainerAnchorShiftCallback(callback): void;
    setContainerProtectionCallback(callback): void;
    setContainerZIndexCallback(callback): void;
}

Type Parameters

Hierarchy

  • AnchoredItemOptions
    • AnchoredDrawingOptions

Properties

defaultLockAspectRatio?: boolean

Allow for the default lock aspect ratio to be overwritten.

fromResourceId?: ((resourceId) => ISharedResource)

from resourceId

Type declaration

getMaxBounds?: (() => Bounds)

Return the maximum bounds of the container. If not defined the container will be unbounded.

Type declaration

Returns

getZIndex?: (() => number)

Return the z-index for the current Drawing.

Type declaration

    • (): number
    • Returns number

initialAnchor: CellRangeCoords

The anchor used when the item is first created.

isProtected: (() => boolean)

If protected the container can protected the item.

Type declaration

    • (): boolean
    • Returns boolean

jsonAnchor?: DrawingAnchorJSON<J>

The initial JSON to load the drawing from.

moveBackwardOnContainer?: (() => void)

Move drawing backward one layer in the zIndex.

Type declaration

    • (): void
    • Returns void

moveForwardOnContainer?: (() => void)

Move drawing forward one layer in the zIndex.

Type declaration

    • (): void
    • Returns void

moveToBackOnContainer?: (() => void)

Move drawing to the back in the zIndex.

Type declaration

    • (): void
    • Returns void

moveToFrontOnContainer?: (() => void)

Move drawing to the font in the zIndex.

Type declaration

    • (): void
    • Returns void

resource?: ISharedResource

If provided the drawing will be added to the resource manager.

transactionStore?: TransactionStore

A transaction store that can be used to undo/redo changes to the table.

type: string

The type of the drawing

Methods

  • Delete from the container

    Returns void

  • Returns the bounds of a range of cells.

    Parameters

    Returns Bounds

  • Parameters

    Returns void

  • Notify anchored item that the record has been deleted from the container.

    Parameters

    • callback: AnchoredItemDeleteCallback

    Returns void

  • Notify anchored item that the pixel bounds have changed due to a resize.

    Parameters

    • callback: AnchoredItemResizeCallback

    Returns void

  • Notify anchored item that the anchor bounds have changed due to an insert/remove.

    Parameters

    • callback: AnchoredItemShiftCallback

    Returns void

  • Notify drawing it's protection has been updated from the container.

    Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns void

  • Notify drawing it's zIndex has been updated from the container.

    Parameters

    • callback: (() => void)
        • (): void
        • Returns void

    Returns void