Alien-GvaScript
view release on metacpan or search on metacpan
lib/Alien/GvaScript/TreeNavigator.pod view on Meta::CPAN
Which tabIndex will be assigned to the tree element
(if not already specified in markup).
The default is 0; specifying a higher value
would give a higher priority to the tree
navigator within the tabbing order.
Setting C<tabIndex> to a negative value means
that the tree navigator receives no focus.
In that case, the keymap created for
capturing keyboard events will be bound globally
to the C<document> element (and therefore might
interact in unpredictable ways with other elements
capturing keys; so this is not a recommended setting).
=head4 flashDuration
Duration (in milliseconds) of "flashing", i.e. visual feedback when a
key is pressed in a wrong context, like for example trying to open a
node which is already open; default is 200 ms.
=head4 flashColor
Color for "flashing", expressed as standard CSS color; default is red.
=head4 selectOnButtonClick
If true, clicking on a "+/-" button next to a label will not only open
or close the node, but will also select that node; default is true.
=head4 noPingOnFirstClick
If true, clicking on an unselected node will just select that node,
without firing the C<Ping> event. Since the node will then be selected,
a second clic (or a double-clic) will fire the event.
This option is C<false> by default.
=head4 selectFirstNode
If true (the default), the first node is selected and gets focus
just after constructing the tree navigator.
=head4 createButtons
If true, creates the "+/-" buttons next to labels; default is true.
=head4 scrollingContainer
The id of the container where the tree overflows.
Default to C<tree.ownerDocument.documentElement>.
This is used for keyboard tree navigation autoscrolling.
=head4 autoScrollPercentage
Makes sure that the selected node is visible in the central area of
its offset parent; if not, the parent is scrolled.
The percentage is the ratio between the parent height and the
margin at which scrolling must occur (default is 20%);
=head4 keymap
A keymap object (see C<Keymap.js>). If that option is given, keyboard
handlers are pushed into that keymap; otherwise a new keymap is
created.
If you supply your own keymap, make
sure that:
=over
=item *
the keymap is attached to an element that properly receives keyboard
events. The document element does, but the tree DIV element does not,
unless it contains items with activated focus (with C<tabIndex>
defined and positive).
=item *
the keymap is created with options C<preventDefault:false> and
C<stopPropagation:false> (because when the tree has no selected node,
the tree navigation handlers do not consume events and try to
propagate them further).
=back
=head4 classes
Class names for various parts of the tree structure.
This should be an inline object, with keys corresponding
to the names below, and with values specified either as
a single class name or as an array of class names.
=over
=item node
Class(es) for node elements (default is C<TN_node>).
A node should contain a label element and a
content element, and should have style
C<display:block>.
=item leaf
Class(es) for leaf elements (default is C<TN_leaf>).
A leaf should contain just a label element.
=item label
Class(es) for label elements (default is C<TN_label>).
A label should have style C<display:inline>.
( run in 0.943 second using v1.01-cache-2.11-cpan-9288abcf80b )