/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.

Parameters:
NameTypeDescription
layerObject
Properties
NameTypeDescription
layer.infojArray

Array of infoj entries.

Returns:

The filter panel drawer element.

Type: 
HTMLElement