Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

presentation-navigation

3.0.5 • Public • Published

presentation-navigation

Augmented.js Next Presentation - Navigation Components

API

Table of Contents

HamburgerMenu

Extends Presentation.AbstractToolbar

A Hamburger Menu View

Parameters

  • options

render

Render the Hamburger Menu

Returns object Returns the view context ('this')

Menu

Extends Presentation.AbstractToolbar

A Menu

Parameters

  • options

render

Renders the Menu

Returns object Returns the view context ('this')

toggle

Toggle the Hamburger menu view

AbstractToolbar

Extends DecoratorView

An abstract tooldbar Component, designed to be extended
As an abstract it's not intented to use directly, most of the api creates the toolbars and no need to pass to constructor.
Supported Options:

  • title : The title of the toolbar (most cases displays)
  • data : Data to pass to the toolbar as object
  • menuItems : The menuItems of the toolbar
  • tooltip : adds a tooltip

Parameters

  • options object Options to pass

addItem

The model property

Parameters

  • id
  • click
  • icon
  • title
  • spacer (optional, default false)

Properties

  • model Model The model property

addItem

The initialized property

Parameters

  • id
  • click
  • icon
  • title
  • spacer (optional, default false)

Properties

  • isInitalized boolean The initialized property

addItem

The menuItems property

Parameters

  • id
  • click
  • icon
  • title
  • spacer (optional, default false)

Properties

  • menuItems array The initialized property

addItem

The title property

Parameters

  • id
  • click
  • icon
  • title
  • spacer (optional, default false)

Properties

  • title string The title property

addItem

Adds an item to the menu

Parameters

  • id {string} The id of the itemID
  • click {string} The bound click method to call
  • icon {string} The icon name (webfont)
  • title {string} The title of the itemID
  • spacer {boolean} Sets a spacer item vs text (not clickable) (optional, default false)

Examples

addItem({"itemID", "event", "web", "something", false });
addItem({"space", null, null, null, true });

addLabel

Adds a label (no click) to the menu

Parameters

  • id {string} The id of the itemID
  • icon {string} The icon name (webfont) (optional, default null)
  • title {string} The title of the itemID
  • level {number} Set the level of the title (1 = h1, 2 = h2, etc. 0 is default and just text) (optional, default 0)

Examples

addLabel({"itemID", "web", "something"});
addLabel({"itemID", "mail", "something", 1});

addSpacer

Adds a spacer item to the menu

Examples

addSpacer();

clearMenuItems

Clear all items in the menu

select

Select an item in the menu

Parameters

getItem

Get an item in the menu

Parameters

NavigationMenu

Extends AbstractToolbar

A Navigation Menu

Parameters

  • options

render

Renders the Menu

Returns object Returns the view context ('this')

NotificationCenter

Extends AbstractToolbar

A Notfication Center Component

Parameters

  • options

notifications

showNotification

Show the NotificationCenter

hideNotification

Hide the NotificationCenter

clearNotifications

Clear the NotificationCenter

render

Renders the Menu

Returns object Returns the view context ('this')

Toolbar

Extends AbstractToolbar

A Toolbar View

Parameters

  • options

render

Render the Toolbar

Returns object Returns the view context ('this')

Iconbar

Extends AbstractToolbar

An Iconbar View

Parameters

  • options

addIcon

Adds an item to the menu

Parameters

  • id {string} The id of the itemID
  • click {string} The bound click method to call
  • icon {string} The icon name (webfont) or image src uri
  • toolTip {string} The toolTip of the itemID
  • isImageLink {boolean} Sets is icon is an image link vs web font

Examples

addIcon({"itemID", "event", "settings", "something", false });
addIcon({"itemID", "event", "/images/blah.png", "something", true });

render

Render the Toolbar

Returns object Returns the view context ('this')

Install

npm i presentation-navigation

DownloadsWeekly Downloads

33

Version

3.0.5

License

Apache-2.0

Unpacked Size

61.3 kB

Total Files

6

Last publish

Collaborators

  • avatar