ui/locations/entries/dataview
The dataview entry module exports the dataview method as mapp.ui.locations.entries.dataview()
Requires
Methods
(inner) assignTargetFromString(entry)
The method assigns "location" as the default dataview [entry] target.
A lookup for an element with the id property matching the target string will be attempted. The dataview will always be displayed in the matched element and the method will shortcircuit.
The mapp default view has a tabview element with a "tabview" data-id property. The tab added to the tabview will be assigned as HTMLElement target.
Without a matched HTMLElement; A target
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:dataview entry. |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entry.target | string | <optional> | "location" | Target string identifying a HTMLElement target. |
(inner) dataview(entry) → {HTMLElement}
The entry object provided to the dataview entry method is effectively a dataview object.
The dataview data property is assigned from the entry value if not undefined in the location_get query response.
The assignTargetFromString method is called to consolidate the required dataview target as a HTMLElement.
The dataview will be shown if the boolean display property is true.
The HTMLElement returned from the method will contain a checkbox element if a label string property has been configured and a location view dataview target element.
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:dataview entry. |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entry.location | location | The entry location. | ||
entry.layer | layer | The entry layer will be assigned from the entry.location. | ||
entry.data | Object | <optional> | The dataview data. | |
entry.label | string | <optional> | Label for checkbox element. | |
entry.dataview | string | <optional> | The dataview type, eg. "chartjs", "tabulator". | |
entry.target | HTMLElement | <optional> | "location" | The dataview will be rendered into the target 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. |
Location view dataview and checkbox.
- Type:
- HTMLElement