Reference Source
import Pane from 'flarum/forum/utils/Pane'
public class | source

Pane

The Pane class manages the page's discussion list sidepane. The pane is a part of the content view (DiscussionPage component), but its visibility is determined by CSS classes applied to the outer page element. This class manages the application of those CSS classes.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
Protected Members
protected

$element: jQuery

The page element.

protected

Whether or not the pane is currently exists.

protected

Whether or not the pane is currently pinned.

protected

The localStorage key to store the pane's pinned state with.

protected

Whether or not the pane is currently showing, or is hidden off the edge of the screen.

Method Summary

Public Methods
public

Disable the pane.

public

enable()

Enable the pane.

public

hide()

Hide the pane.

public

Begin a timeout to hide the pane, which can be cancelled by showing the pane.

public

show()

Show the pane.

public

Toggle whether or not the pane is pinned.

Protected Methods
protected

render()

Apply the appropriate CSS classes to the page element.

Public Constructors

public constructor() source

Public Members

public hideTimeout: * source

Protected Members

protected $element: jQuery source

The page element.

protected active: Boolean source

Whether or not the pane is currently exists.

protected pinned: Boolean source

Whether or not the pane is currently pinned.

protected pinnedKey: String source

The localStorage key to store the pane's pinned state with.

protected showing: Boolean source

Whether or not the pane is currently showing, or is hidden off the edge of the screen.

Public Methods

public disable() source

Disable the pane.

public enable() source

Enable the pane.

public hide() source

Hide the pane.

public onmouseleave() source

Begin a timeout to hide the pane, which can be cancelled by showing the pane.

public show() source

Show the pane.

public togglePinned() source

Toggle whether or not the pane is pinned.

Protected Methods

protected render() source

Apply the appropriate CSS classes to the page element.