# Interface FancytreeNode

A FancytreeNode represents the hierarchical data model and operations.

interface FancytreeNode {
children : FancytreeNode [];
data : any;
expanded : boolean;
extraClasses : string;
folder : boolean;
icon : string;
key : string;
lazy : boolean;
parent : FancytreeNode ;
span : HTMLElement;
statusNodeType : string;
title : string;
tooltip : string;
tr : HTMLTableRowElement;
tree : Fancytree ;
unselectable ?: boolean;
unselectableIgnore ?: boolean;
unselectableStatus ?: boolean;
addChildren (
children: NodeData [],
insertBefore?: FancytreeNode ,
): FancytreeNode ;
addChildren (children: NodeData [], insertBefore?: string): FancytreeNode ;
addChildren (children: NodeData [], insertBefore?: number): FancytreeNode ;
addChildren (child: NodeData , insertBefore?: FancytreeNode ): FancytreeNode ;
addChildren (child: NodeData , insertBefore?: string): FancytreeNode ;
addChildren (child: NodeData , insertBefore?: number): FancytreeNode ;
addClass (className: string): void;
addNode (node: NodeData , mode?: string): FancytreeNode ;
applyPatch (patch: NodePatch ): JQueryPromise <any>;
collapseSiblings (): JQueryPromise <any>;
copyTo (
node: FancytreeNode ,
mode?: string,
map?: (node: NodeData ) => void,
): FancytreeNode ;
countChildren (deep?: boolean): number;
debug (msg: any): void;
editCreateNode (mode?: string, init?: Object ): void;
editEnd (applyChanges: boolean): void;
editStart (): void;
findAll (match: string): FancytreeNode [];
findAll (match: (node: FancytreeNode ) => boolean): FancytreeNode [];
findFirst (match: string): FancytreeNode ;
findFirst (match: (node: FancytreeNode ) => boolean): FancytreeNode ;
fixSelection3AfterClick (): void;
fixSelection3FromEndNodes (): void;
fromDict (dict: NodeData ): void;
getChildren (): FancytreeNode [];
getCloneList (includeSelf?: boolean): FancytreeNode [];
getFirstChild (): FancytreeNode ;
getIndex (): number;
getIndexHier (): string;
getKeyPath (excludeSelf: boolean): string;
getLastChild (): FancytreeNode ;
getLevel (): number;
getNextSibling (): FancytreeNode ;
getParent (): FancytreeNode ;
getParentList (includeRoot: boolean, includeSelf: boolean): FancytreeNode [];
getPrevSibling (): FancytreeNode ;
hasChildren (): boolean;
hasFocus (): boolean;
info (msg: string): void;
isActive (): boolean;
isChildOf (otherNode: FancytreeNode ): boolean;
isClone (): boolean;
isDescendantOf (otherNode: FancytreeNode ): boolean;
isEditing (): boolean;
isExpanded (): boolean;
isFirstSibling (): boolean;
isFolder (): boolean;
isLastSibling (): boolean;
isLazy (): boolean;
isLoaded (): boolean;
isLoading (): boolean;
isRootNode (): boolean;
isSelected (): boolean;
isStatusNode (): boolean;
isTopLevel (): boolean;
isUndefined (): boolean;
isVisible (): boolean;
load (forceReload?: boolean): JQueryPromise <any>;
makeVisible (opts?: Object ): JQueryPromise <any>;
moveTo (
targetNode: FancytreeNode ,
mode: string,
map?: (node: FancytreeNode ) => void,
): void;
navigate (where: number, activate?: boolean): JQueryPromise <any>;
remove (): void;
removeChild (childNode: FancytreeNode ): void;
removeChildren (): void;
removeClass (className: string): void;
render (force?: boolean, deep?: boolean): void;
renderStatus (): void;
renderTitle (): void;
reRegister (key: string, refKey: string): boolean;
resetLazy (): void;
scheduleAction (mode: string, ms: number): void;
scrollIntoView (effects?: boolean, options?: Object ): JQueryPromise <any>;
scrollIntoView (effects?: Object , options?: Object ): JQueryPromise <any>;
setActive (flag?: boolean, opts?: Object ): JQueryPromise <any>;
setExpanded (flag?: boolean, opts?: Object ): JQueryPromise <any>;
setFocus (flag?: boolean): void;
setSelected (flag?: boolean): void;
setStatus (status: string, message?: string, details?: string): void;
setTitle (title: string): void;
sortChildren (
cmp?: (a: FancytreeNode , b: FancytreeNode ) => number,
deep?: boolean,
): void;
toDict (recursive?: boolean, callback?: (dict: NodeData ) => void): NodeData ;
toggleClass (className: string, flag?: boolean): boolean;
toggleExpanded (): void;
toggleSelected (): void;
visit (fn: (node: FancytreeNode ) => any, includeSelf?: boolean): boolean;
visitAndLoad (
fn: (node: FancytreeNode ) => any,
includeSelf?: boolean,
): JQueryPromise <any>;
visitParents (
fn: (node: FancytreeNode ) => any,
includeSelf?: boolean,
): boolean;
warn (msg: any): void;
}

- Defined in src/public/app/types-fancytree.d.ts:219

##### Index

### Properties

children
data
expanded
extraClasses
folder
icon
key
lazy
parent
span
statusNodeType
title
tooltip
tr
tree
unselectable?
unselectableIgnore?
unselectableStatus?

### Methods

addChildren
addClass
addNode
applyPatch
collapseSiblings
copyTo
countChildren
debug
editCreateNode
editEnd
editStart
findAll
findFirst
fixSelection3AfterClick
fixSelection3FromEndNodes
fromDict
getChildren
getCloneList
getFirstChild
getIndex
getIndexHier
getKeyPath
getLastChild
getLevel
getNextSibling
getParent
getParentList
getPrevSibling
hasChildren
hasFocus
info
isActive
isChildOf
isClone
isDescendantOf
isEditing
isExpanded
isFirstSibling
isFolder
isLastSibling
isLazy
isLoaded
isLoading
isRootNode
isSelected
isStatusNode
isTopLevel
isUndefined
isVisible
load
makeVisible
moveTo
navigate
remove
removeChild
removeChildren
removeClass
render
renderStatus
renderTitle
reRegister
resetLazy
scheduleAction
scrollIntoView
setActive
setExpanded
setFocus
setSelected
setStatus
setTitle
sortChildren
toDict
toggleClass
toggleExpanded
toggleSelected
visit
visitAndLoad
visitParents
warn

## Properties

### children

children: FancytreeNode []

Array of child nodes. For lazy nodes, null or undefined means 'not yet loaded'. Use an empty array to define a node that has no children.

- Defined in src/public/app/types-fancytree.d.ts:232

### data

data: any

Contains all extra data that was passed on node creation

- Defined in src/public/app/types-fancytree.d.ts:230

### expanded

expanded: boolean

Use isExpanded(), setExpanded() to access this property.

- Defined in src/public/app/types-fancytree.d.ts:234

### extraClasses

extraClasses: string

Addtional CSS classes, added to the node's `<span>`.

- Defined in src/public/app/types-fancytree.d.ts:236

### folder

folder: boolean

Folder nodes have different default icons and click behavior. Note: Also non-folders may have children.

- Defined in src/public/app/types-fancytree.d.ts:238

### icon

icon: string

Icon of the tree node.

- Defined in src/public/app/types-fancytree.d.ts:240

### key

key: string

Node id (must be unique inside the tree)

- Defined in src/public/app/types-fancytree.d.ts:226

### lazy

lazy: boolean

True if this node is loaded on demand, i.e. on first expansion.

- Defined in src/public/app/types-fancytree.d.ts:244

### parent

parent: FancytreeNode

The parent node

- Defined in src/public/app/types-fancytree.d.ts:224

### span

span: HTMLElement

Outer element of single nodes

- Defined in src/public/app/types-fancytree.d.ts:248

### statusNodeType

statusNodeType: string

null or type of temporarily generated system node like 'loading', or 'error'.

- Defined in src/public/app/types-fancytree.d.ts:242

### title

title: string

Display name (may contain HTML)

- Defined in src/public/app/types-fancytree.d.ts:228

### tooltip

tooltip: string

Alternative description used as hover banner

- Defined in src/public/app/types-fancytree.d.ts:246

### tr

tr: HTMLTableRowElement

Outer element of single nodes for table extension

- Defined in src/public/app/types-fancytree.d.ts:250

### tree

tree: Fancytree

The tree instance

- Defined in src/public/app/types-fancytree.d.ts:222

### `Optional` unselectable

unselectable?: boolean

- Defined in src/public/app/types-fancytree.d.ts:251

### `Optional` unselectableIgnore

unselectableIgnore?: boolean

- Defined in src/public/app/types-fancytree.d.ts:252

### `Optional` unselectableStatus

unselectableStatus?: boolean

- Defined in src/public/app/types-fancytree.d.ts:253

## Methods

### addChildren

- addChildren(children: NodeData [], insertBefore?: FancytreeNode ): FancytreeNode

  Append (or insert) a list of child nodes.

  #### Parameters

  - children: NodeData []

    array of child node definitions (also single child accepted)

  - `Optional` insertBefore: FancytreeNode

    child node to insert nodes before. If omitted, the new children is appended.

  #### Returns FancytreeNode

  The first child added.

  - Defined in src/public/app/types-fancytree.d.ts:265
- addChildren(children: NodeData [], insertBefore?: string): FancytreeNode

  Append (or insert) a list of child nodes.

  #### Parameters

  - children: NodeData []

    array of child node definitions (also single child accepted)

  - `Optional` insertBefore: string

    key of the child node to insert nodes before. If omitted, the new children is appended.

  #### Returns FancytreeNode

  The first child added.

  - Defined in src/public/app/types-fancytree.d.ts:273
- addChildren(children: NodeData [], insertBefore?: number): FancytreeNode

  Append (or insert) a list of child nodes.

  #### Parameters

  - children: NodeData []

    array of child node definitions (also single child accepted)

  - `Optional` insertBefore: number

    index of the child node to insert nodes before. If omitted, the new children is appended.

  #### Returns FancytreeNode

  The first child added.

  - Defined in src/public/app/types-fancytree.d.ts:281
- addChildren(child: NodeData , insertBefore?: FancytreeNode ): FancytreeNode

  Append (or insert) a single child node.

  #### Parameters

  - child: NodeData

    node to add

  - `Optional` insertBefore: FancytreeNode

    child node to insert this node before. If omitted, the new child is appended.

  #### Returns FancytreeNode

  The child added.

  - Defined in src/public/app/types-fancytree.d.ts:289
- addChildren(child: NodeData , insertBefore?: string): FancytreeNode

  Append (or insert) a single child node.

  #### Parameters

  - child: NodeData

    node to add

  - `Optional` insertBefore: string

    key of the child node to insert this node before. If omitted, the new child is appended.

  #### Returns FancytreeNode

  The child added.

  - Defined in src/public/app/types-fancytree.d.ts:297
- addChildren(child: NodeData , insertBefore?: number): FancytreeNode

  Append (or insert) a single child node.

  #### Parameters

  - child: NodeData

    node to add

  - `Optional` insertBefore: number

    index of the child node to insert this node before. If omitted, the new child is appended.

  #### Returns FancytreeNode

  The child added.

  - Defined in src/public/app/types-fancytree.d.ts:305

### addClass

- addClass(className: string): void

  Add class to node's span tag and to .extraClasses.

  #### Parameters

  - className: string

    class name

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:310

### addNode

- addNode(node: NodeData , mode?: string): FancytreeNode

  Append or prepend a node, or append a child node. This a convenience function that calls addChildren()

  #### Parameters

  - node: NodeData
  - `Optional` mode: string

    'before', 'after', 'firstChild', or 'child' ('over' is a synonym for 'child') (default='child')

  #### Returns FancytreeNode

  new node.

  - Defined in src/public/app/types-fancytree.d.ts:317

### applyPatch

- applyPatch(patch: NodePatch ): JQueryPromise <any>

  Modify existing child nodes.

  #### Parameters

  - patch: NodePatch

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:320

### collapseSiblings

- collapseSiblings(): JQueryPromise <any>

  Collapse all sibling nodes.

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:323

### copyTo

- copyTo(
  node: FancytreeNode ,
  mode?: string,
  map?: (node: NodeData ) => void,
  ): FancytreeNode

  Copy this node as sibling or child of `node`.

  #### Parameters

  - node: FancytreeNode

    source node

  - `Optional` mode: string

    'before' | 'after' | 'child' (default='child')

  - `Optional` map: (node: NodeData ) => void

    callback function(NodeData) that could modify the new node

  #### Returns FancytreeNode

  new node.

  - Defined in src/public/app/types-fancytree.d.ts:332

### countChildren

- countChildren(deep?: boolean): number

  Count direct and indirect children.

  #### Parameters

  - `Optional` deep: boolean

    pass 'false' to only count direct children. (default=true)

  #### Returns number

  - Defined in src/public/app/types-fancytree.d.ts:338

### debug

- debug(msg: any): void

  Write to browser console if debugLevel >= 2 (prepending node info)

  #### Parameters

  - msg: any

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:341

### editCreateNode

- editCreateNode(mode?: string, init?: Object ): void

  [ext-edit] Create a new child or sibling node and start edit mode.

  #### Parameters

  - `Optional` mode: string

    'before', 'after', or 'child' (default='child')

  - `Optional` init: Object

    NodeData (or simple title string)

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:348

### editEnd

- editEnd(applyChanges: boolean): void

  [ext-edit] Stop inline editing.

  #### Parameters

  - applyChanges: boolean

    false: cancel edit, true: save (if modified)

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:354

### editStart

- editStart(): void

  [ext-edit] Start inline editing of current node title.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:357

### findAll

- findAll(match: string): FancytreeNode []

  Find all nodes that contain `match` in the title.

  #### Parameters

  - match: string

    string to search for

  #### Returns FancytreeNode []

  - Defined in src/public/app/types-fancytree.d.ts:363
- findAll(match: (node: FancytreeNode ) => boolean): FancytreeNode []

  Find all nodes that contain `match` in the title.

  #### Parameters

  - match: (node: FancytreeNode ) => boolean

    a function that returns `true` if a node is matched.

  #### Returns FancytreeNode []

  - Defined in src/public/app/types-fancytree.d.ts:369

### findFirst

- findFirst(match: string): FancytreeNode

  Find first node that contains `match` in the title (not including self).

  #### Parameters

  - match: string

    string to search for

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:375
- findFirst(match: (node: FancytreeNode ) => boolean): FancytreeNode

  Find first node that contains `match` in the title (not including self).

  #### Parameters

  - match: (node: FancytreeNode ) => boolean

    a function that returns `true` if a node is matched.

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:381

### fixSelection3AfterClick

- fixSelection3AfterClick(): void

  Fix selection status, after this node was (de)selected in multi-hier mode. This includes (de)selecting all children.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:384

### fixSelection3FromEndNodes

- fixSelection3FromEndNodes(): void

  Fix selection status for multi-hier mode. Only end-nodes are considered to update the descendants branch and parents. Should be called after this node has loaded new children or after children have been modified using the API.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:387

### fromDict

- fromDict(dict: NodeData ): void

  Update node data. If dict contains 'children', then also replace the hole sub tree.

  #### Parameters

  - dict: NodeData

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:390

### getChildren

- getChildren(): FancytreeNode []

  Return the list of child nodes (undefined for unexpanded lazy nodes).

  #### Returns FancytreeNode []

  - Defined in src/public/app/types-fancytree.d.ts:393

### getCloneList

- getCloneList(includeSelf?: boolean): FancytreeNode []

  [ext-clones] Return a list of clone-nodes or null.

  #### Parameters

  - `Optional` includeSelf: boolean

  #### Returns FancytreeNode []

  - Defined in src/public/app/types-fancytree.d.ts:396

### getFirstChild

- getFirstChild(): FancytreeNode

  Return the first child node or null.

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:399

### getIndex

- getIndex(): number

  Return the 0-based child index.

  #### Returns number

  - Defined in src/public/app/types-fancytree.d.ts:402

### getIndexHier

- getIndexHier(): string

  Return the hierarchical child index (1-based, e.g. '3.2.4').

  #### Returns string

  - Defined in src/public/app/types-fancytree.d.ts:405

### getKeyPath

- getKeyPath(excludeSelf: boolean): string

  Return the parent keys separated by options.keyPathSeparator, e.g. "id_1/id_17/id_32".

  #### Parameters

  - excludeSelf: boolean

  #### Returns string

  - Defined in src/public/app/types-fancytree.d.ts:408

### getLastChild

- getLastChild(): FancytreeNode

  Return the last child of this node or null.

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:411

### getLevel

- getLevel(): number

  Return node depth. 0: System root node, 1: visible top-level node, 2: first sub-level, ... .

  #### Returns number

  - Defined in src/public/app/types-fancytree.d.ts:414

### getNextSibling

- getNextSibling(): FancytreeNode

  Return the successor node (under the same parent) or null.

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:417

### getParent

- getParent(): FancytreeNode

  Return the parent node (null for the system root node).

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:420

### getParentList

- getParentList(includeRoot: boolean, includeSelf: boolean): FancytreeNode []

  Return an array of all parent nodes (top-down).

  #### Parameters

  - includeRoot: boolean

    Include the invisible system root node. (default=false)

  - includeSelf: boolean

    Include the node itself (default=false).

  #### Returns FancytreeNode []

  - Defined in src/public/app/types-fancytree.d.ts:427

### getPrevSibling

- getPrevSibling(): FancytreeNode

  Return the predecessor node (under the same parent) or null.

  #### Returns FancytreeNode

  - Defined in src/public/app/types-fancytree.d.ts:430

### hasChildren

- hasChildren(): boolean

  Return true if node has children. Return undefined if not sure, i.e. the node is lazy and not yet loaded).

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:433

### hasFocus

- hasFocus(): boolean

  Return true if node has keyboard focus.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:436

### info

- info(msg: string): void

  Write to browser console if debugLevel >= 1 (prepending node info)

  #### Parameters

  - msg: string

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:439

### isActive

- isActive(): boolean

  Return true if node is active (see also FancytreeNode.isSelected).

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:442

### isChildOf

- isChildOf(otherNode: FancytreeNode ): boolean

  Return true if node is a direct child of otherNode.

  #### Parameters

  - otherNode: FancytreeNode

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:445

### isClone

- isClone(): boolean

  [ext-clones] Return true if this node has at least another clone with same refKey.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:448

### isDescendantOf

- isDescendantOf(otherNode: FancytreeNode ): boolean

  Return true, if node is a direct or indirect sub node of otherNode.

  #### Parameters

  - otherNode: FancytreeNode

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:451

### isEditing

- isEditing(): boolean

  [ext-edit] Check if this node is in edit mode.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:454

### isExpanded

- isExpanded(): boolean

  Return true if node is expanded.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:457

### isFirstSibling

- isFirstSibling(): boolean

  Return true if node is the first node of its parent's children.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:460

### isFolder

- isFolder(): boolean

  Return true if node is a folder, i.e. has the node.folder attribute set.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:463

### isLastSibling

- isLastSibling(): boolean

  Return true if node is the last node of its parent's children.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:466

### isLazy

- isLazy(): boolean

  Return true if node is lazy (even if data was already loaded)

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:469

### isLoaded

- isLoaded(): boolean

  Return true if node is lazy and loaded. For non-lazy nodes always return true.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:472

### isLoading

- isLoading(): boolean

  Return true if children are currently beeing loaded, i.e. a Ajax request is pending.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:475

### isRootNode

- isRootNode(): boolean

  Return true if this is the (invisible) system root node.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:478

### isSelected

- isSelected(): boolean

  Return true if node is selected, i.e. has a checkmark set (see also FancytreeNode#isActive).

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:481

### isStatusNode

- isStatusNode(): boolean

  Return true if this node is a temporarily generated system node like 'loading', or 'error' (node.statusNodeType contains the type).

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:484

### isTopLevel

- isTopLevel(): boolean

  Return true if this a top level node, i.e. a direct child of the (invisible) system root node.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:487

### isUndefined

- isUndefined(): boolean

  Return true if node is lazy and not yet loaded. For non-lazy nodes always return false.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:490

### isVisible

- isVisible(): boolean

  Return true if all parent nodes are expanded. Note: this does not check whether the node is scrolled into the visible part of the screen.

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:493

### load

- load(forceReload?: boolean): JQueryPromise <any>

  Load all children of a lazy node if neccessary. The expanded state is maintained.

  #### Parameters

  - `Optional` forceReload: boolean

    Pass true to discard any existing nodes before.

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:499

### makeVisible

- makeVisible(opts?: Object ): JQueryPromise <any>

  Expand all parents and optionally scroll into visible area as neccessary. Promise is resolved, when lazy loading and animations are done.

  #### Parameters

  - `Optional` opts: Object

    passed to `setExpanded()`. Defaults to {noAnimation: false, noEvents: false, scrollIntoView: true}

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:505

### moveTo

- moveTo(
  targetNode: FancytreeNode ,
  mode: string,
  map?: (node: FancytreeNode ) => void,
  ): void

  Move this node to targetNode.

  #### Parameters

  - targetNode: FancytreeNode
  - mode: string

    'child': append this node as last child of targetNode. This is the default. To be compatble with the D'n'd hitMode, we also accept 'over'. 'before': add this node as sibling before targetNode. 'after': add this node as sibling after targetNode.

  - `Optional` map: (node: FancytreeNode ) => void

    optional callback(FancytreeNode) to allow modifcations

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:517

### navigate

- navigate(where: number, activate?: boolean): JQueryPromise <any>

  Set focus relative to this node and optionally activate.

  #### Parameters

  - where: number

    The keyCode that would normally trigger this move, e.g. `$.ui.keyCode.LEFT` would collapse the node if it is expanded or move to the parent oterwise.

  - `Optional` activate: boolean

    (default=true)

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:524

### remove

- remove(): void

  Remove this node (not allowed for system root).

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:527

### removeChild

- removeChild(childNode: FancytreeNode ): void

  Remove childNode from list of direct children.

  #### Parameters

  - childNode: FancytreeNode

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:530

### removeChildren

- removeChildren(): void

  Remove all child nodes and descendents. This converts the node into a leaf. If this was a lazy node, it is still considered 'loaded'; call node.resetLazy() in order to trigger lazyLoad on next expand.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:535

### removeClass

- removeClass(className: string): void

  Remove class from node's span tag and .extraClasses.

  #### Parameters

  - className: string

    class name

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:540

### render

- render(force?: boolean, deep?: boolean): void

  This method renders and updates all HTML markup that is required to display this node in its current state.

  #### Parameters

  - `Optional` force: boolean

    re-render, even if html markup was already created

  - `Optional` deep: boolean

    also render all descendants, even if parent is collapsed

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:547

### renderStatus

- renderStatus(): void

  Update element's CSS classes according to node state.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:550

### renderTitle

- renderTitle(): void

  Create HTML markup for the node's outer (expander, checkbox, icon, and title).

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:553

### reRegister

- reRegister(key: string, refKey: string): boolean

  [ext-clones] Update key and/or refKey for an existing node.

  #### Parameters

  - key: string
  - refKey: string

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:556

### resetLazy

- resetLazy(): void

  Remove all children, collapse, and set the lazy-flag, so that the lazyLoad event is triggered on next expand.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:559

### scheduleAction

- scheduleAction(mode: string, ms: number): void

  Schedule activity for delayed execution (cancel any pending request). scheduleAction('cancel') will only cancel a pending request (if any).

  #### Parameters

  - mode: string
  - ms: number

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:562

### scrollIntoView

- scrollIntoView(effects?: boolean, options?: Object ): JQueryPromise <any>

  #### Parameters

  - `Optional` effects: boolean

    animation options.

  - `Optional` options: Object

    {topNode: null, effects: ..., parent: ...} this node will remain visible in any case, even if `this` is outside the scroll pane.

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:568
- scrollIntoView(effects?: Object , options?: Object ): JQueryPromise <any>

  #### Parameters

  - `Optional` effects: Object

    animation options.

  - `Optional` options: Object

    {topNode: null, effects: ..., parent: ...} this node will remain visible in any case, even if `this` is outside the scroll pane.

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:574

### setActive

- setActive(flag?: boolean, opts?: Object ): JQueryPromise <any>

  #### Parameters

  - `Optional` flag: boolean

    pass false to deactivate

  - `Optional` opts: Object

    additional options. Defaults to {noEvents: false}

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:580

### setExpanded

- setExpanded(flag?: boolean, opts?: Object ): JQueryPromise <any>

  #### Parameters

  - `Optional` flag: boolean

    pass false to collapse.

  - `Optional` opts: Object

    additional options. Defaults to {noAnimation:false, noEvents:false}

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:586

### setFocus

- setFocus(flag?: boolean): void

  Set keyboard focus to this node.

  #### Parameters

  - `Optional` flag: boolean

    pass false to blur.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:593

### setSelected

- setSelected(flag?: boolean): void

  Select this node, i.e. check the checkbox.

  #### Parameters

  - `Optional` flag: boolean

    pass false to deselect.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:600

### setStatus

- setStatus(status: string, message?: string, details?: string): void

  Mark a lazy node as 'error', 'loading', or 'ok'.

  #### Parameters

  - status: string

    'error', 'ok'

  - `Optional` message: string
  - `Optional` details: string

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:607

### setTitle

- setTitle(title: string): void

  Rename this node.

  #### Parameters

  - title: string

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:610

### sortChildren

- sortChildren(
  cmp?: (a: FancytreeNode , b: FancytreeNode ) => number,
  deep?: boolean,
  ): void

  Sort child list by title.

  #### Parameters

  - `Optional` cmp: (a: FancytreeNode , b: FancytreeNode ) => number

    custom compare function(a, b) that returns -1, 0, or 1 (defaults to sort by title).

  - `Optional` deep: boolean

    pass true to sort all descendant nodes

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:618

### toDict

- toDict(recursive?: boolean, callback?: (dict: NodeData ) => void): NodeData

  Convert node (or whole branch) into a plain object. The result is compatible with node.addChildren().

  #### Parameters

  - `Optional` recursive: boolean

    include child nodes.

  - `Optional` callback: (dict: NodeData ) => void

    callback(dict) is called for every node, in order to allow modifications

  #### Returns NodeData

  - Defined in src/public/app/types-fancytree.d.ts:626

### toggleClass

- toggleClass(className: string, flag?: boolean): boolean

  Set, clear, or toggle class of node's span tag and .extraClasses.

  #### Parameters

  - className: string

    class name (separate multiple classes by space)

  - `Optional` flag: boolean

    true/false to add/remove class. If omitted, class is toggled.

  #### Returns boolean

  true if a class was added

  - Defined in src/public/app/types-fancytree.d.ts:633

### toggleExpanded

- toggleExpanded(): void

  Flip expanded status.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:636

### toggleSelected

- toggleSelected(): void

  Flip selection status.

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:639

### visit

- visit(fn: (node: FancytreeNode ) => any, includeSelf?: boolean): boolean

  Call fn(node) for all child nodes. Stop iteration, if fn() returns false. Skip current branch, if fn() returns "skip". Return false if iteration was stopped.

  #### Parameters

  - fn: (node: FancytreeNode ) => any

    the callback function. Return false to stop iteration, return "skip" to skip this node and its children only.

  - `Optional` includeSelf: boolean

    (default=false)

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:649

### visitAndLoad

- visitAndLoad(
  fn: (node: FancytreeNode ) => any,
  includeSelf?: boolean,
  ): JQueryPromise <any>

  Call fn(node) for all child nodes and recursively load lazy children. Note: If you need this method, you probably should consider to review your architecture! Recursivley loading nodes is a perfect way for lazy programmers to flood the server with requests ;-)

  #### Parameters

  - fn: (node: FancytreeNode ) => any

    the callback function. Return false to stop iteration, return "skip" to skip this node and its children only.

  - `Optional` includeSelf: boolean

    (default=false)

  #### Returns JQueryPromise <any>

  - Defined in src/public/app/types-fancytree.d.ts:659

### visitParents

- visitParents(fn: (node: FancytreeNode ) => any, includeSelf?: boolean): boolean

  Call fn(node) for all parent nodes, bottom-up, including invisible system root. Stop iteration, if fn() returns false. Return false if iteration was stopped.

  #### Parameters

  - fn: (node: FancytreeNode ) => any

    the callback function. Return false to stop iteration, return "skip" to skip this node and its children only.

  - `Optional` includeSelf: boolean

    (default=false)

  #### Returns boolean

  - Defined in src/public/app/types-fancytree.d.ts:669

### warn

- warn(msg: any): void

  Write warning to browser console (prepending node info)

  #### Parameters

  - msg: any

  #### Returns void

  - Defined in src/public/app/types-fancytree.d.ts:674