/ui/elements/drawer

The drawer element module exports the drawer method for the mapp.ui.elements{} library object.

Methods

(inner) drawer(params) → {HTMLElement}

The drawer method will create and return drawer element with a header and content.

Parameters:
NameTypeDescription
paramsObject

The configuration params for the drawer element.

Properties
NameTypeAttributesDescription
params.data_idstring

The data-id for drawer element.

params.headerHTML

The header element[s].

params.contentHTML

The content element[s] for the drawer.

params.popoutboolean<optional>

Whether the drawer can be popped out into a dialog.

Returns:

The drawer element.

Type: 
HTMLElement

(inner) onClick(e)

The [drawer] onClick event method will shortcircuit if the parentElement has the empty class.

Parameters:
NameTypeDescription
eObject

The click event.

(inner) popoutDialog(params)

the popoutDialog creates the popout element for a drawer and appends the popout button to the header of the drawer.

Parameters:
NameTypeDescription
paramsObject

The configuration params for the popout element.

Properties
NameTypeDescription
params.data_idstring

The data-id for popout element.

params.headerHTML

The header element[s].

params.contentHTML

The content element[s] for the popout.

params.drawerHTML

The drawer element being popped out.

params.originalTargetHTML

The element that holds the content within the drawer being popped out.