Skip to main content

Node

new Node()

Node is a base class for Blocks.

Methods

addChild

Adding new node childs to parent node.

addChild(...node)

Parameters

  • node : Node[]

Returns

  • addChild : void

removeChild

Removes a child node from parent node.

removeChild(child)

Parameters

  • child : Node

Returns

  • removeChild : void

listAllChilds

Listing every child for callback function _func

listAllChilds(_func)

Parameters

  • _func: (node: Node) => void

Returns

  • listAllChilds : void

listOnlyChild

Listing only parent childs in sort for callback function _func. Depends on resetSort for every time to be sorted.

listOnlyChild(_func, sort, nodes)

Parameters

  • _func: (node: B, currIdx: number, arrLen: number) => void
  • sort: string | undefined
  • nodes: Node[] | undefined

Returns

  • listOnlyChild : void

resetSort

Resets sorting for childs.

resetSort()

Parameters

Returns

  • resetSort : void