/ui/layers/panels/style

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

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.

Parameters:
NameTypeDescription
layerlayer

A decorated mapp layer with a style object.

Properties
NameTypeAttributesDefaultDescription
layer.stylelayer-style

The layer style configuration.

style.hiddenBoolean

Do not create style drawer for layer.view.

style.classListstring

String of additional classes to add to the drawer element.

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