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.
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:dataview entry. |
Name | Type | Attributes | Description |
---|---|---|---|
entry.location | location | The entry location. | |
entry.layer | layer | The entry layer will be assigned from the entry.location. | |
entry.data | Object | The dataview data. | |
entry.label | string | <optional> | Label for checkbox element. |
entry.dataview | string | <optional> | The dataview type, eg. "chartjs", "tabulator". |
entry.target | string | <optional> | The dataview target. Will resolve to HTMLElement. |
entry.update | function | <optional> | The dataview update method. |
entry.display | boolean | <optional> | The dataview display flag. |
entry.show | function | <optional> | The dataview show method. |
entry.hide | function | <optional> | The dataview hide method. |
entry.locationViewTarget | HTMLElement | <optional> | Dataview target for display in location.view. |
Location view dataview and checkbox.
- Type:
- HTMLElement