/ui/layers/panels/style

The style panel module exports the styleDrawer method for the mapp.ui.layers.panels{} library object.

Dictionary entries:

  • layer_style_header

Requires

Methods

(inner) stylePanel(layer) → {HTMLElement}

The stylePanel will shortcircuit with the layer.style.hidden flag.

A layer style panel element will be requested from mapp.utils.style.panel().

A default order for the elements that make up the style panel will be assigned as mapp.ui.elements.style.elements[] if not implicit in configuration.

A drawer element will be created with the style panel element as content.

A default array will be assigned to the layer.style object to order the elements being added to the view in the elements.layerStyle panel method.

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

Parameters:
NameTypeDescription
layerlayer

A decorated mapp layer with a style object.

Properties
NameTypeAttributesDefaultDescription
layer.stylelayer-style

The layer style configuration.

style.hiddenboolean<optional>

Do not create style drawer for layer.view.

style.popoutboolean<optional>

Whether the drawer can be popped out into a dialog.

style.classListstring<optional>

The string will be appended to the drawer element classlist..

style.elementsarray<optional>
['labels','label','hovers','hover','themes','theme', 'icon_scaling','opacitySlider']

Array of default elements and their order for the style panel.

Returns:

The style drawer element for the layer.view.

Type: 
HTMLElement