Home Reference Source
import SidebarNavigationViewController from '~/controllers/SidebarNavigationViewController.js'
public class | source

SidebarNavigationViewController

Extends:

ViewController → SidebarNavigationViewController

Controller for navigation controller

Constructor Summary

Public Constructor
public

constructor(navigation: HTMLElement)

Member Summary

Public Members
public

navigation: HTMLElement

Navigation root

public

sections: HTMLAnchorElement

Section elements

public

titlePairs(titlePairs: Map<HTMLAnchorElement, HTMLUListElement>)

Pairs of sections to items

Method Summary

Public Methods
public

Begin animation queue

public

Closes all open sections

public

Finishes queue and plays animation

public

* getOpenSections(): HTMLAnchorElement[]

Gets currently active selections

public

toggleSection(section: HTMLUListElement, isOpen: boolean)

Toggles a given section by the anchor

Inherited Summary

From class ViewController
public static

forClass(className: string, predicate: Function, root: HTMLElement)

Creates a view controller directly for all members of a class.

public static

of(elem: string | Element): ViewController

Returns a canolical VC of an element if it exists

Public Constructors

public constructor(navigation: HTMLElement) source

Override:

ViewController#constructor

Params:

NameTypeAttributeDescription
navigation HTMLElement

semantic nav element

Public Members

public navigation: HTMLElement source

Navigation root

public sections: HTMLAnchorElement source

Section elements

public titlePairs(titlePairs: Map<HTMLAnchorElement, HTMLUListElement>) source

Pairs of sections to items

Public Methods

public beginQueue() source

Begin animation queue

public closeAllSections() source

Closes all open sections

public finishQueue() source

Finishes queue and plays animation

public * getOpenSections(): HTMLAnchorElement[] source

Gets currently active selections

Return:

HTMLAnchorElement[]

public toggleSection(section: HTMLUListElement, isOpen: boolean) source

Toggles a given section by the anchor

Params:

NameTypeAttributeDescription
section HTMLUListElement
  • nullable: true

Does nothing if this is null

isOpen boolean