/ui/layers/panels/filter

The filter panel module exports the filterPanel method for the creation of a filter panel in the layer view.

Dictionary entries:

  • layer_filter_header
  • layer_filter_select
  • layer_filter_clear_all
  • layer_filter_reset_all

Requires

Methods

(inner) filterPanel(layer) → {HTMLElement}

The filterPanel method creates a list of available filter from the layer infoj entries.

A dropdown will be created to select the filter. The dropdown callback will create a filter card element and append this element to the drawer.

A clearAll button is created and appended to the drawer. The clearAll button will only be visible when filter with cards are in the filter.list.

filter.viewport can be supplied to limit the count to what is shown in the viewport.

Specifying layer.filter.drawer: false will prevent a drawer from being made for the filter panel.

Parameters:
NameTypeDescription
layerObject
Properties
NameTypeDescription
layer.infojArray

Array of infoj entries.

Returns:

The filter panel drawer element.

Type: 
HTMLElement

(inner) reports(layer) → {HTMLElement}

Creates a list of a elements containing links to custom views.

Specifying layer.reports.drawer: false will prevent a drawer from being made for the reports panel.

Parameters:
NameTypeDescription
layerObject
Properties
NameTypeDescription
layer.reportsArray

The configuration of the reports

Returns:

The report element for the panel.

Type: 
HTMLElement

/ui/layers/panels/reports

Exports a function for creating a drawer or just a panel which contains links to custom views.

    {
      "report_1":{
        "template": "report_template"
      }
    }

Supplying layer.reports.drawer: false will return the links a plain dev instead of a drawer

Methods

(inner) filterPanel(layer) → {HTMLElement}

The filterPanel method creates a list of available filter from the layer infoj entries.

A dropdown will be created to select the filter. The dropdown callback will create a filter card element and append this element to the drawer.

A clearAll button is created and appended to the drawer. The clearAll button will only be visible when filter with cards are in the filter.list.

filter.viewport can be supplied to limit the count to what is shown in the viewport.

Specifying layer.filter.drawer: false will prevent a drawer from being made for the filter panel.

Parameters:
NameTypeDescription
layerObject
Properties
NameTypeDescription
layer.infojArray

Array of infoj entries.

Returns:

The filter panel drawer element.

Type: 
HTMLElement

(inner) reports(layer) → {HTMLElement}

Creates a list of a elements containing links to custom views.

Specifying layer.reports.drawer: false will prevent a drawer from being made for the reports panel.

Parameters:
NameTypeDescription
layerObject
Properties
NameTypeDescription
layer.reportsArray

The configuration of the reports

Returns:

The report element for the panel.

Type: 
HTMLElement