tool_lp/scaleconfig

Handle opening a dialogue to configure scale data.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Members

(inner) Reference :Dialogue

Source:

to the popup.

Type:
  • Dialogue

(inner) scaleid :Number

Source:

Current scale ID.

Type:
  • Number

(inner) scalevalues :Array

Source:

ID and name of the scales.

Type:
  • Array

(inner) The :String

Source:

select box selector.

Type:
  • String

(inner) The :String

Source:

hidden field selector.

Type:
  • String

(inner) The :String

Source:

trigger selector.

Type:
  • String

(inner) {Number)

Source:

Methods

(inner) getScaleValues(scaleid) → {Promise}

Source:

Get the scale values for the selected scale.

Parameters:
Name Type Description
scaleid Number

The scale ID of the selected scale.

Returns:

A deffered object with the scale values.

Type
Promise

(inner) init(selectSelector, inputSelector, triggerSelector) → {ScaleConfig}

Source:

Main initialisation.

Parameters:
Name Type Description
selectSelector String

The select box selector.

inputSelector String

The hidden input field selector.

triggerSelector String

The trigger selector.

Returns:

A new instance of ScaleConfig.

Type
ScaleConfig

(inner) initScaleConfig(popup)

Source:

Initialises the scale configuration dialogue.

Parameters:
Name Type Description
popup Dialogue

Dialogue object to initialise.

(inner) retrieveOriginalScaleConfig() → {Object|String}

Source:

Gets the original scale configuration if it was set.

Returns:

scale configuration or empty string.

Type
Object | String

(inner) scaleChangeHandler(e)

Source:

Triggered when a scale is selected.

Parameters:
Name Type Description
e Event

(inner) setScaleConfig()

Source:

Set the scale configuration back into a JSON string in the hidden element.

(inner) showConfig()

Source:

Displays the scale configuration dialogue.