/ui/utils/dataview

The dataview ui utils provide access to a method which creates a toolbar for dataviews.

Toolbar method defined in the mapp.ui.utils.dataview.toolbar object are accessible for dataview types.

Requires

Methods

(inner) Toolbar(_this)

The Toolbar method will create a HTML Element container with target elements for toolbar elements and the dataview itself.

Parameters:
NameTypeDescription
_thisdataview

Dataview object.

Properties
NameTypeAttributesDescription
_this.toolbarObject

Configuration object for a toolbar supporting the dataview.

_this.dataviewstring

The type of dataview

_this.targetHTMLElement

Target element in which the dataview is rendered.

_this.panelHTMLElement<optional>

A panel element to be displayed in a tab[view].

(inner) mapChange(_this)

The mapChange method assigns an event listener for the custom changeEnd event of the dataview.layer mapview.

The mapChange property can be a function which is executed if the 'changeEnd' event is triggered.

Otherwise the dataview.update() method will be executed.

The event method will shortcircuit if the dataview object is tabview tab without the .active class.

Parameters:
NameTypeDescription
_thisObject

Dataview object.

Properties
NameTypeAttributesDescription
_this.mapChangeObject<optional>

A boolean flag or function.

_this.layerlayer

A layer associated with a dataview.

layer.mapviewmapview

The layer mapview.

(inner) update(dataview)

The update [toolbar] method will return a button element for the dataview toolbar.

The button will toggle a dialog for dataview update.

Parameters:
NameTypeDescription
dataviewdataview

Dataview object.

(inner) updateDialog(dataview)

The updateDialog method will present a jsonEditor element in a dialog.

The jsonEditor toolbar will provide methods to update the dataview or set the dataview data from the JSON content of the jsonEditor element.

Parameters:
NameTypeDescription
dataviewdataview

Dataview object.