AbstractLayer

AbstractLayer

Abstract class for all layer components. Provides methods and variables that are valid for all layers, such as open, close, update, change content, etc. Component is used from https://www.npmjs.com/package/clulib

Constructor

new AbstractLayer(type)

Source:
Parameters:
Name Type Description
type string

Use LayerType

Extends

  • Component

Members

(protected) activeContentId_ :string|null

Description:
  • Active layer content id. All layer content dom elements (class layer-content) have to include the attribute data-content=id.

Source:

Active layer content id. All layer content dom elements (class layer-content) have to include the attribute data-content=id.

Type:
  • string | null

(protected) autoResetProvider_ :AutoResetProvider

Description:
  • Reference to AutoResetProvider to monitor and control the automatic reset of the page when the user is inactive for a specified period of time.

Source:

Reference to AutoResetProvider to monitor and control the automatic reset of the page when the user is inactive for a specified period of time.

Type:

(protected) closeButtons_ :NodeList

Description:
  • Dom element of the close button

Source:

Dom element of the close button

Type:
  • NodeList

(protected) contentSwitchers_ :NodeList

Description:
  • List of dom elements defined by the query selector button.layer-content-switcher.

Source:

List of dom elements defined by the query selector button.layer-content-switcher.

Type:
  • NodeList

(protected) content_ :Element

Description:
  • Active layer content element

Source:

Active layer content element

Type:
  • Element

(protected) contents_ :NodeList

Description:
  • List of all layer content elements

Source:

List of all layer content elements

Type:
  • NodeList

(protected) cursorProvider_ :CursorProvider

Description:
  • Reference to CursorProvider for monitoring and controlling the visibility of the custom mouse cursor object.

Source:

Reference to CursorProvider for monitoring and controlling the visibility of the custom mouse cursor object.

Type:

(protected) layerData_ :*

Description:
Source:

Data object which holds the values passed by the LayerEvent from the LayerProvider to this component.

Type:
  • *

(protected) layerModel_ :LayerModel

Description:
Source:

Layer model which is passed by the LayerEvent from the LayerProvider to this component.

Type:

(protected) layerProvider_ :LayerProvider

Description:
  • Reference to LayerProvider for monitoring and controlling layer appearance and disappearance.

Source:

Reference to LayerProvider for monitoring and controlling layer appearance and disappearance.

Type:

(protected) resizeProvider_ :ResizeProvider

Description:
  • Reference to ResizeProvider for monitoring device size changes

Source:

Reference to ResizeProvider for monitoring device size changes

Type:

(protected) type_ :string

Description:
  • Defines which type this layer component is. Use LayerType.

Source:

Defines which type this layer component is. Use LayerType.

Type:
  • string

Methods

(protected) activateContent_()

Description:
  • Activates all interactive elements in the active layer content.

Source:

(protected) activate_()

Description:
  • Activates all interactive elements in the layer. Enable all known buttons (defined by the query selector button.layer-content-switcher) that trigger a content switch.

Source:

(protected) checkLayerContentInitalisation_(event)

Description:
  • Checks whether a content change and thus an update of the content should take place when the layer is called up again.

Source:
Parameters:
Name Type Description
event LayerEvent

(protected) deactivateContent_()

Description:
  • Dectivates all interactive elements in the active layer content.

Source:

(protected) deactivate_()

Description:
  • Dectivates all interactive elements in the layer.

Source:

(protected) handleCloseClick_(event)

Description:
  • Handle layer close click

Source:
Parameters:
Name Type Description
event Event

(protected) handleContentSwitch_(event)

Source:
Parameters:
Name Type Description
event Event

(protected) handleHideLayer_(event)

Description:
Source:
Parameters:
Name Type Description
event LayerEvent

(protected) handleResize_()

Description:
  • Handle window resize

Source:

(protected) handleShowLayer_(event)

Description:
  • Hides and deactivates the layer by the LayerEvent SHOW_LAYER from the LayerProvider. Initializes dynamic content creation if the content does not already represent the desired content.

Source:
Parameters:
Name Type Description
event LayerEvent

(protected) handleUpdateLayer_(event)

Description:
Source:
Parameters:
Name Type Description
event LayerEvent

(protected) initContentElements_()

Description:
  • Builds/finds in the dom of the component the layer contents and selects/displays the active content.

Source:

(protected) initContent_(layer, dataopt) → {Promise}

Description:
  • Init a switch of the layer content by layer navigation elements.

Source:
Parameters:
Name Type Attributes Default Description
layer LayerModel
data * <optional>
null
Returns:
Type
Promise

onInit()

Description:
  • Component is ready and had loaded all dependencies (inherit method waitFor and sub components). Init the main listeners for monitoring layer state and window size changes.

Source:

(protected) switchContent_(id)

Description:
  • Switches the display of the current layer content element. Id is assigned to a dom element width class layer-content and with the attribute data-content=id.

Source:
Parameters:
Name Type Description
id string