A specialized tab bar for side areas.

Hierarchy (view full)

Constructors

Properties

_dynamicTabOptions?: core.Options
collapseRequested: Signal<SideTabBar, Title<Widget>> = ...

Side panels can be collapsed by clicking on the currently selected tab. This signal is emitted when the mouse is released on the selected tab without initiating a drag.

contentContainer: HTMLElement
isMouseOver: boolean = false
mouseData?: {
    mouseDownTabIndex: number;
    pressX: number;
    pressY: number;
}

Type declaration

  • mouseDownTabIndex: number
  • pressX: number
  • pressY: number
needsRecompute: boolean = false
openTabsContainer: HTMLDivElement
openTabsRoot: Root
pendingReveal?: Promise<void>
scrollBar?: PerfectScrollbar
scrollBarFactory: (() => PerfectScrollbar)

Type declaration

    • (): PerfectScrollbar
    • Returns PerfectScrollbar

tabAdded: Signal<SideTabBar, {
    title: Title<Widget>;
}> = ...

Emitted when a tab is added to the tab bar.

Type declaration

  • title: Title<Widget>
tabSize: number = 0
tabsOverflowChanged: Signal<SideTabBar, {
    startIndex: number;
    titles: Title<Widget>[];
}> = ...

Emitted when the set of overflowing/hidden tabs changes.

Type declaration

  • startIndex: number
  • titles: Title<Widget>[]
tabsOverflowData?: {
    startIndex: number;
    titles: Title<Widget>[];
}

Type declaration

  • startIndex: number
  • titles: Title<Widget>[]
toCancelViewContainerDND: DisposableCollection = ...
toDispose: DisposableCollection = ...
topRow: HTMLElement
DRAG_THRESHOLD: 5 = 5

Accessors

  • get hiddenContentNode(): HTMLUListElement
  • Tab bars of the left and right side panel are arranged vertically by rotating their labels. Rotation is realized with the CSS transform property, which disrupts the browser's ability to arrange the involved elements automatically. Therefore the elements are arranged explicitly by the TabBarRenderer using inline height and top styles. However, the size of labels must still be computed by the browser, so the rendering is performed in two steps: first the tab bar is rendered horizontally inside a hidden content node, then it is rendered again vertically inside the proper content node. After the first step, size information is gathered from all labels so it can be applied during the second step.

    Returns HTMLUListElement

Methods

  • The following event processing is used to generate collapseRequested signals when the mouse goes up on the currently selected tab without too much movement between mousedown and mouseup. The movement threshold is the same that is used by the superclass to detect a drag event. The allowDeselect option of the TabBar constructor cannot be used here because it is triggered when the mouse goes down, and thus collides with dragging.

    Parameters

    • event: Event

    Returns void

  • Handle viewContainerPart drag over, Defines the appropriate dropAction and opens the tab on which the mouse stands on for more than 800 ms.

    Parameters

    • event: IDragEvent

    Returns void

  • Restructures the DOM defined in PhosphorJS.

    By default the tabs (li) are contained in the this.contentNode (ul) which is wrapped in a div (this.node). Instead of this structure, we add a container for the this.contentNode and for the toolbar. The scrollbar will only work for the ul part but it does not affect the toolbar, so it can be on the right hand-side.

    Returns void