ui/locations/entries/text

The locations entries text module exports the default text entry as mapp.ui.locations.entries.text(entry)

Dictionary entries:

  • loading
  • no_options_available

Requires

Methods

(inner) onkeyup(e, entry)

The method is triggered by the onkeyup event of the text input.

The newValue property is assigned from the event target input element.

The value will be split into an array if the arraySeparator string property is defined in the entry.edit configuration.

The location valChange event is dispatched to check whether the newValue is changed from the current value.

Parameters:
NameTypeDescription
eevent

onkeyup event.

entryinfoj-entry

type:geometry entry.

Properties
NameTypeAttributesDescription
entry.newValueobject

value for valChange check.

entry.editobject

editing configuration.

edit.arraySeparatorstring<optional>

string value used to split a string into an array value.

entry.locationlocation

location to update.

(inner) text(entry) → {HTMLElement}

The text method will return the textedit function for editable entries or an HTML node with the formated field value.

Non editable entries without a value will return void.

Parameters:
NameTypeDescription
entryinfoj-entry

type:geometry entry.

Properties
NameTypeAttributesDescription
entry.valueObject

geometry as JSON value.

entry.editObject<optional>

configuration object for editing the value.

Returns:

elements for the location view.

Type: 
HTMLElement

(inner) textedit(entry) → {HTMLElement}

The textedit method will return input elements for editable type:text entries.

A container element is returned if edit.options are defined. The async textoptions method is called to populate this container element.

A text input is returned if no options are configured.

Parameters:
NameTypeDescription
entryinfoj-entry

type:geometry entry.

Properties
NameTypeAttributesDescription
entry.valueObject

geometry as JSON value.

entry.editObject

configuration object for editing the value.

edit.optionsarray<optional>

options array for valid values.

Returns:

elements for the location view.

Type: 
HTMLElement

(async, inner) textoptions(entry)

The textoptions method will render a dropdown control for the edit.options[] array values into the entry.container.

Parameters:
NameTypeDescription
entryinfoj-entry

type:geometry entry.

Properties
NameTypeDescription
entry.valueObject

geometry as JSON value.

entry.editObject

configuration object for editing the value.