Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExpNodeComponent

Component used to render a node.

Hierarchy

  • ExpNodeComponent

Index

Constructors

constructor

  • Initializes node, containerEl, callbacks and types variable. Calls render to render passed node.

    Parameters

    • node: Node

      Node object that should be rendered in the ExpNodeComponent.

    • containerEl: Element

      Element that should be a container for the ExpNodeComponent.

    • Optional callbacks: NodeCallbacks

      Object with callback functions.

    • Optional types: ReadonlyArray<NodeType>

      Array containing types that can be used for a node.

    Returns ExpNodeComponent

Properties

Private Optional callbacks

callbacks: NodeCallbacks

Defines an object containing callbacks for all buttons defined for a node.

Private containerEl

containerEl: Element

Defines an element where the ExpNodeComponent will be appended to.

Private node

node: Node

Defines a node object that should be rendered in the ExpNodeComponent.

Private Optional types

types: ReadonlyArray<NodeType>

Defines an array of types that can be used for a node.

Methods

Private enableChildrenActions

  • enableChildrenActions(expNodeComponent: Element): void
  • Enables children actions for a given node.

    Parameters

    • expNodeComponent: Element

      Node which should have children actions enabled.

    Returns void

Private registerDeleteBtnClickListener

  • registerDeleteBtnClickListener(expNodeComponent: Element): void
  • Registers an event listener and enables the edit button for a given node.

    Parameters

    • expNodeComponent: Element

      Node for which the edit button should be registered.

    Returns void

Private registerEditBtnClickListener

  • registerEditBtnClickListener(expNodeComponent: Element): void
  • Registers an event listener and enables the edit button for a given node.

    Parameters

    • expNodeComponent: Element

      Node for which the edit button should be registered.

    Returns void

Private registerExpandBtnClickListener

  • registerExpandBtnClickListener(expNodeComponent: Element): void
  • Registers an event listener for the children action button to show/collapse the children nodes.

    Parameters

    • expNodeComponent: Element

      Node for which the expand button should be registered.

    Returns void

Private registerSelectClickListener

  • registerSelectClickListener(expNodeComponent: Element): void
  • Registers an event listener for the selection of a node.

    Parameters

    • expNodeComponent: Element

      Node for which the edit button should be registered.

    Returns void

Private render

  • render(): void

Private renderChildNodes

  • renderChildNodes(expNodeComponent: Element): void
  • Renders children nodes of a node.

    Parameters

    • expNodeComponent: Element

      Node which children should be rendered out.

    Returns void

Static create

  • Creates a new instance of ExpNodeComponent and adds it to a container.

    Parameters

    • node: Node

      Node object that should be rendered in the ExpNodeComponent.

    • containerEl: Element

      Element that should be a container for the ExpNodeComponent.

    • Optional callbacks: NodeCallbacks

      Object with callback functions.

    • Optional types: ReadonlyArray<NodeType>

      Array containing types that can be used for a node.

    Returns ExpNodeComponent

Generated using TypeDoc