PanelCollapserOverlay

A panel collapse implementation that adds the ability to reveal the collapsed panel as a floating overlay.

Configs

8
autoClose: Object | Boolean= true

By default, the following three events will hide the revealed overlay:

  • mousedown outside of the revealed overlay
  • mouseout of the revealed overlay
  • focusout of the revealed overlay

This can be configured per event type, for example:

// Don't hide on mouseout, only on click out
autoClose : {
   mousedown : true,
   mouseout  : false,
   focusout  : false
}

Configure as a boolean to apply the same value for all events.

If the mousedown property is a selector string, clicks on elements matching that selector will also close the revealed overlay:

// Close when clicking outside, but not when clicking grid cells - those should not close the overlay
autoClose : {
   mousedown : ':not(.b-grid-cell)',
   mouseout  : false,
   focusout  : false
}

Note that if creating a whitelist using :not(), the :not() expression must encapsulate your whitelist selector.

If the revealed overlay was shown using the recollapseTool then moving the mouse outside of the revealed overlay hides the revealed overlay.

Configure this as false to disable auto hiding, making overlayed state permanent, and changeable using the toggleReveal method.

ParameterTypeDescription
mousedownBoolean | String

true to hide the revealed panel when clicking outside of it. This may also be a selector string to specify elements which cause auto close when clicked.

mouseoutBoolean

true to hide the revealed panel when the mouse leaves it.

focusoutBoolean

true to hide the revealed panel when it loses focus.

autoCloseDelay: Number= 1000

The number of milliseconds to wait once the mouse leaves a revealed panel before returning to an unrevealed state. Clicking outside the revealed panel will immediately return the panel to its collapsed state.

This may be disabled by configuring autoClose.mouseout as false.

If this value is negative, the panel will not automatically recollapse due to the mouse leaving, however, clicks outside the panel will still recollapse it.

If this value is null, the panel will not automatically recollapse for either outside clicks or if the mouse leaves the panel.

The reveal/hide tool which slides the collapsed panel over the top of the UI.

The type of this instance should not be changed but the tool instance can be configured in other ways via this config property.

animationPanelCollapser
collapseTooltipPanelCollapser
directionPanelCollapser
expandTooltipPanelCollapser
toolPanelCollapser

Properties

3

Class hierarchy

isPanelCollapserOverlay: Boolean= truereadonly
Identifies an object as an instance of PanelCollapserOverlay class, or subclass thereof.
isPanelCollapserOverlay: Boolean= truereadonlystatic
Identifies an object as an instance of PanelCollapserOverlay class, or subclass thereof.

Other

The reveal/hide tool which slides the collapsed panel over the top of the UI.

Functions

1

Toggles the revealed state of the Panel to match the passed boolean flag.

ParameterTypeDescription
stateBoolean

If not specified, this method toggles current state. Otherwise, pass true to reveal the overlay, or false to hide it.