Class Groups

Shapes can be arranged into multiple groups using the Groups Manager The class provides a variety of APIs for working with groups

Hierarchy (view full)

Constructors

Accessors

  • get list(): Group[]
  • Returns list of the created gropus

    Returns Group[]

Methods

  • Adds a list of the given shapes to the group Whenever a group doesn't exist, it automatically creates one

    Parameters

    • shapes: ShapeModel<Shape<ShapeConfig> | Group, ShapeConfig>[]

      The array of [[ShapeModel]]

    • groupName: string

      The group name

    Returns Group

    The created [[Group]]

  • Creates a new group

    Parameters

    • groupName: string

      The group name

    • config: ContainerConfig = {}

      The group configurations

    Returns Group

    The created [[Group]]

  • Deletes a group based on the give name Undoing this action is possible

    Parameters

    • groupName: string

      The group name

    Returns void

  • Destory a group. Undoing this action is impossible

    Parameters

    • groupName: string

      The group name

    Returns void

  • Removes list of the given shapes from the group The group won't be removed if it remains empty

    Parameters

    • shapes: ShapeModel<Shape<ShapeConfig> | Group, ShapeConfig>[]

      The array of [[ShapeModel]]

    • groupName: string

      The group name

    Returns void

  • Searches for a group by the given name. If nothing is found, it will return undefinedit will return undefined if nothing is found

    Parameters

    • groupName: string

      The name of the group

    Returns undefined | Group

    The found [[Group]]

  • Searches a group by its name If nothing is found, it will create a new group

    Parameters

    • groupName: string

      The group name

    • config: ContainerConfig = {}

      The group configurations

    Returns Group

    The created group

  • Restores a group based on the given name

    Parameters

    • groupName: string

      The group name

    Returns void

  • Splits the shapes of the given group and removes the group Groups that are cached cannot be split

    Parameters

    • groupName: string

      The group name

    Returns void