Class: AbstractButton

PSV.buttons~AbstractButton

new AbstractButton (navbar, className, collapsable) abstract

Base navbar button class

Name Type Default Description
navbar PSV.components.Navbar
className string optional

Additional CSS classes

collapsable boolean false optional

true if the button can be moved to menu when the navbar is too small

Extends

Members

children Array.<PSV.components.AbstractComponent> packagereadonly inherited overrides

All child components

container HTMLElement readonly inherited overrides

icon string readonly

SVG icon name injected in the button

iconActive string readonly

SVG icon name injected in the button when it is active

id string readonly

Unique identifier of the button

prop Object protected inherited overrides

Internal properties

Properties:
Name Type Description
id string

Unique identifier of the button

enabled boolean
supported boolean
collapsed boolean
active boolean
width number

Reference to main controller

Methods

checkSupported () package

collapse ()

Collapses the button in the navbar menu

destroy () protected inherited overrides

Destroys the component

disable ()

Disables the button

enable ()

Enables the button

Hides the component

isSupported ()boolean | Object

Checks if the button can be displayed

Returns:
Type Description
boolean | Object

isVisible ()boolean inherited overrides

Check if the component is visible

Returns:
Type Description
boolean

refreshUi () package inherited overrides

Refresh UI

Must be be a very lightweight operation

Displays the component

toggle () inherited overrides

Displays or hides the component

toggleActive (active)

Changes the active state of the button

Name Type Description
active boolean optional

forced state

uncollapse ()

Uncollapses the button from the navbar menu