Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Utils

Contains helper methods.

Hierarchy

  • Utils

Index

Methods

Static arrayEmpty

  • arrayEmpty(array?: ReadonlyArray<any>): boolean
  • Checks if an array is empty.

    Parameters

    • Default value array: ReadonlyArray<any> = []

      Array that should be checked.

    Returns boolean

Static arrayNotEmpty

  • arrayNotEmpty(array?: ReadonlyArray<any>): boolean
  • Checks if an array is not empty.

    Parameters

    • Default value array: ReadonlyArray<any> = []

      Array that should be checked.

    Returns boolean

Static checkIfElementContainsClassName

  • checkIfElementContainsClassName(element: Element, className: string): boolean
  • Checks if an element contains a class name in its class list.

    Parameters

    • element: Element

      An element which should be checked if it contains a class name.

    • className: string

      Class name that should be used for checking.

    Returns boolean

Static checkIfObjectHasProperty

  • checkIfObjectHasProperty(object?: __type, property: string): boolean
  • Checks if an object has a property.

    Parameters

    • Default value object: __type = {}

      An object that should be checked if it has a property.

    • property: string

      Property that should be used for check.

    Returns boolean

Static getCssClassForAssignedType

  • getCssClassForAssignedType(node: Node, types?: ReadonlyArray<NodeType>): string
  • Retrieves the css class from types array bases on the type assigned to a node.

    Parameters

    • node: Node

      Node object containing the type for which the css class should be retrieved from types array.

    • Default value types: ReadonlyArray<NodeType> = []

      Array containing list of types.

    Returns string

Static isDefined

  • isDefined(object: any): boolean
  • Checks if an object is not undefined and not null.

    Parameters

    • object: any

      Object that should be tested.

    Returns boolean

Static removeSelectionFromAllShapes

  • removeSelectionFromAllShapes(): void
  • Removes selection from all nodes presented in wrapper element.

    Returns void

Generated using TypeDoc