ui/locations/entries/dataview

The dataview entry module exports the dataview method as mapp.ui.locations.entries.dataview()

Requires

Methods

(inner) dataview(entry) → {HTMLElement}

mapp.ui.locations.entries.dataview()

The dataview.data{} will be assigned from the entry.value if available.

The dataview.layer will be assigned from the entry.location.layer

A document lookup for the target ID will be attempted if the target is provided as string. The dataview will be decorated, created, and updated in this case.

A dataview has already been decorated if a dataview.update method exists. The entry method will check the display condition to show the dataview and return the entry HTMLElements.

The dataview.tabview will be assigned if the document queryselector finds a matching data-id, eg. "tabview".

The dataview will be added as a new tab to the tabview.

A locationViewTarget element will be created and returned to the location.view without a tabview or implicit target element for the dataview.

The dataview entry is decorated to be a typedef:dataview object by passing the entry as argument to the mapp.ui.Dataview(entry) method.

A decorated dataview entry will have show(), hide(), and an update() method.

A checkbox element will be created if the dataview entry has a label.

The display flag controls whether the dataview should be immediately displayed.

The dataview checkbox and locationViewTarget elements will be returned if available.

Parameters:
NameTypeDescription
entryinfoj-entry

type:dataview entry.

Properties
NameTypeAttributesDescription
entry.locationlocation

The entry location.

entry.layerlayer

The entry layer will be assigned from the entry.location.

entry.dataObject

The dataview data.

entry.labelstring<optional>

Label for checkbox element.

entry.dataviewstring<optional>

The dataview type, eg. "chartjs", "tabulator".

entry.targetstring<optional>

The dataview target. Will resolve to HTMLElement.

entry.updatefunction<optional>

The dataview update method.

entry.displayboolean<optional>

The dataview display flag.

entry.showfunction<optional>

The dataview show method.

entry.hidefunction<optional>

The dataview hide method.

entry.locationViewTargetHTMLElement<optional>

Dataview target for display in location.view.

Returns:

Location view dataview and checkbox.

Type: 
HTMLElement