# Class: Tree

## M_.Tree()

A graphical tree

## Constructor

#### new Tree()

##### Properties:

Name | Type | Description
--- | --- | ---
`autoLoad` | string |
`tpl` | string |

### Extends

- M_.Outlet

### Methods

#### addNode(node, parentId)

##### Parameters:

Name | Type | Description
--- | --- | ---
`node` | NodeObject |
`parentId` | string |

#### create() → {type}

Overrides:
  - M_.Outlet#create

##### Returns:

Type
  type

#### destroy()

Destroy the outlet

Inherited From:
  - M_.Outlet#destroy

#### draw()

Draw the tree

#### findEl(selector) → {jQuery}

Search a class or selector in the container, like $.find()

##### Parameters:

Name | Type | Description
--- | --- | ---
`selector` | string |

Inherited From:
  - M_.Outlet#findEl

##### Returns:

Type
  jQuery

#### getEl() → {jquery}

Return jEl element. Generally the main object.

Inherited From:
  - M_.Outlet#getEl

##### Returns:

the main jQuery element

Type
  jquery

#### getNode(nodeId) → {NodeObject}

##### Parameters:

Name | Type | Description
--- | --- | ---
`nodeId` | string |

##### Returns:

Type
  NodeObject

#### getNodePath(nodeId) → {Array}

##### Parameters:

Name | Type | Description
--- | --- | ---
`nodeId` | type |

##### Returns:

Type
  Array

#### moveNode(nodeId, parentId)

##### Parameters:

Name | Type | Description
--- | --- | ---
`nodeId` | string |
`parentId` | string |

#### removeNode(nodeId)

##### Parameters:

Name | Type | Description
--- | --- | ---
`nodeId` | string |

#### setRootNode(rootNode)

##### Parameters:

Name | Type | Description
--- | --- | ---
`rootNode` | NodeObject |