Class CircleModel

Hierarchy (view full)

Constructors

Properties

config: ShapeConfig

Represents the configuration of the shape

node: Circle

Represents the shape's node

Accessors

  • get filters(): Filters[]
  • Returns a list of the shape's filters

    Returns Filters[]

  • get group(): Nullable<string>
  • Returns group id of the shape

    Returns Nullable<string>

  • set group(name): void
  • Adds the shape to the given group name

    Parameters

    Returns void

  • get isActive(): boolean
  • Returns whether the shape is active or not

    Returns boolean

  • get isDeleted(): boolean
  • Returns whether the shape is deleted or not

    Returns boolean

  • get isInvisible(): boolean
  • Returns whether the shape is invisible or not

    Returns boolean

  • get isSelectable(): boolean
  • Returns whether the shape is selectable or not

    Returns boolean

  • set isSelectable(selectable): void
  • Updates the selectable behavior of the shape

    Parameters

    • selectable: boolean

    Returns void

  • get isVisible(): any
  • Returns whether the shape is visible or not

    Returns any

  • get name(): string
  • Returns name of the shape

    Returns string

  • get type(): string
  • Returns type of the shape

    Returns string

Methods

  • Adds filter or filters to the selected shapes

    Parameters

    Returns void

  • Deletes the shape.

    This action can undo with [[ShapeModel.undelete]] method

    Returns void

  • Destroys a deleted shape

    Returns void

  • Flips the shape horizontally

    Returns void

  • Flips the shape vertically

    Returns void

  • Returns whether the shape belongs to a group

    Returns boolean

  • Returns height of the shape

    Returns number

  • Makes the shape hidden if is visible

    Returns Shape<ShapeConfig> | Group

  • Rotates the node around its center without transforming

    Parameters

    • theta: number

      The rotation angle

    Returns void

  • Returns scale value of the shape

    Returns undefined | Vector2d

  • Returns scaleX value of the shape

    Returns number

  • Returns scaleY value of the shape

    Returns number

  • Adds the shape to the selections

    Returns void

  • Makes the shape visible if is hidden

    Returns Shape<ShapeConfig> | Group

  • Updates attributes of the shape with animation effect

    Parameters

    • attributes: Partial<CircleConfig> & {
          duration: number;
      } & Partial<{
          onFinish: (() => void);
          onUpdate: (() => void);
      }>

      The list of attributes

    Returns void

  • Updates attributes of the shape

    Parameters

    • attributes: Partial<CircleConfig>

      The list of attributes

    Returns void

  • Returns width of the shape

    Returns number

  • Returns x position of the shape

    Returns number

  • Returns y position of the shape

    Returns number