2D markup Image object interface.

interface IMarkupImage {
    delete(): void;
    enableMouseEditing(value: boolean): void;
    getHeight(): number;
    getPosition(): { x: number; y: number };
    getRotation(): number;
    getSrc(): string;
    getWidth(): number;
    getZIndex(): number;
    id(): string;
    ref(): any;
    setHeight(h: number): void;
    setPosition(x: number, y: number): void;
    setRotation(degrees: number): void;
    setSrc(src: string): void;
    setWidth(w: number): void;
    setZIndex(zIndex: number): void;
    type(): string;
    updateScreenCoordinates(): void;
}

Hierarchy (View Summary)

Methods

  • Enables or disables the ability to select and edit an object using the mouse.

    Parameters

    • value: boolean

    Returns void

  • Returns the height of the image. The original image is scaled to this height.

    Returns number

  • Returns the screen coordinates of the top-left point (position) of the image.

    Returns { x: number; y: number }

  • Returns the rotation angle of the object, in degress.

    Returns number

  • Returns the image source as a base64-encoded Data URL.

    Returns string

  • Returns the width of the image. The original image is scaled to this width.

    Returns number

  • Returns the Z-index of a object relative to sibling objects that are in the same group.

    Z-Index is not absolute (like in CSS). It is relative to parent object group only:

    • images - are olways at the bottom
    • texts - are olways on top
    • others - are always between images and texts

    Returns number

  • Returns the internal identifier of the object. Not unique.

    Returns string

  • Returns a reference to a core markup library object (Konva, VisualizeJS, etc.).

    Returns any

  • Sets the height of the image. The image width will be automatically updated to match its aspect ratio.

    Parameters

    • h: number

    Returns void

  • Sets the screen coordinates of the top-left point (position) of the image.

    Parameters

    • x: number
    • y: number

    Returns void

  • Sets the rotation angle of the object.

    Parameters

    • degrees: number

      Number of degress to rotate.

    Returns void

  • Sets the image source. External image URL is not supported, only base64-encoded Data URLs.

    Parameters

    • src: string

      Image source as base64-encoded string.

    Returns void

  • Sets the width of the image. The image height will be automatically updated to match its aspect ratio.

    Parameters

    • w: number

    Returns void

  • Sets the Z-index of a object relative to sibling objects that are in the same group.

    Z-Index is not absolute (like in CSS). It is relative to parent object group only:

    • images - are olways at the bottom
    • texts - are olways on top
    • others - are always between images and texts

    Parameters

    • zIndex: number

      An integer value of Z-Index.

    Returns void

  • Returns the type of the object.

    Returns string