Class DrawingShapeModel

The Drawing model for Shapes.

We currently use the shape for group, shape, and connections.

Hierarchy (view full)

Constructors

Properties

instanceCounter: number = 0

Accessors

  • get isAnchoredItem(): true
  • For runtime type checking

    Returns true

  • get isDrawing(): true
  • For runtime inspection.

    Returns true

  • get type(): string
  • Unique type for the drawing object.

    Returns string

  • get uuid(): string
  • A specific uuid for use in memory.

    Returns string

    Remarks

    Useful for caches and react keys. This is not persisted.

  • get zIndex(): number
  • The order in the z plane. To adjust this use the move methods.

    Returns number

Methods

  • Similar to delete but cleans resources and can't be undone..

    Returns void

  • Set the absolution position of a drawing in pixels. If only some of the points are provided then only those will be moved.

    Parameters

    Returns void

  • This is the alternative text use for assistive technologies.

    Parameters

    • description: string

    Returns void

    Default Value

    null
    
  • If true then the drawing object is hidden.

    Parameters

    • hidden: boolean

    Returns void

    Default Value

    false
    
  • If true then the aspect should be maintained during resize if using the corners or if the api only specifies one dimension.

    Parameters

    • lockAspectRatio: boolean

    Returns void

    Default Value

    depends on the drawing type.
    
  • Set the name for a drawing object.

    Parameters

    • name: string

    Returns void

  • Set the rotation in degrees.

    Parameters

    • rotation: number

    Returns void

    Default Value

    0