Skip to content
Martin@MBP edited this page Mar 18, 2016 · 2 revisions

Fancytree FAQ (Frequently Asked Questions)

Q: What statuses can a node have?

A node may be active, selected, focused, and/or hovered.
These states are independent, so one node can have all, some, or none of these states at the same time:

  • hovered
    Only one (or no) node can be hovered at any given time.
    A node becomes hovered, when the mouse pointer rests over it.
  • focused
    Only one (or no) node can be focused at any given time.
    A node becomes focused, when the user presses TAB to enter the tree, or by pressing UP / DOWN keys.
    Note: if the autoActivate option is set, a node will be automatically activated, when it receives focus. (Use Ctrl-UP / Ctrl-DOWN keys to focus only.)
  • active
    Only one (or no) node can be active at any given time.
    A node becomes active by a mouse click, keyboard navigation, or pressing SPACE on a focused node (or using UP, DOWN, when the autoActivate option is set).
    A typical use case would be to use the tree for navigation, i.e. to display details of the active node in a separate pane.
  • selected
    None, one, or multiple nodes can be selected at any given time.
    If the checkbox option is active, this will reflect the select-state.
    However in selectMode 1 ('single select'), only one node is selectable, so the behavior is comparable to radio-buttons.
    A use case would be to allow the user to select several elements out of a set of hierarchical items.

(Other statuses include 'expanded', 'lazy', 'disabled', ...)

Q: What's the difference between 'active' and 'selected'?

See 'What statuses can a node have?'

Q: Why was Dynatree 2.0 renamed to 'Fancytree'?

Fancytree is a complete rewrite that also led to some bigger (and some subtle) changes in the API. I felt that this could cause to some confusion, when googling for solutions or looking at code samples in Stackoverflow that refer to older versions of Dynatree.