- Description:
Handle opening a dialogue to configure scale data.
- Source:
- Copyright:
- 2015 Adrian Greeve
- 2015 Adrian Greeve
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Handle opening a dialogue to configure scale data.
Members
(inner) Reference :Dialogue
- Description:
to the popup.
- Source:
to the popup.
Type:
- Dialogue
(inner) The :String
- Description:
select box selector.
- Source:
select box selector.
Type:
- String
(inner) The :String
- Description:
hidden field selector.
- Source:
hidden field selector.
Type:
- String
(inner) The :String
- Description:
trigger selector.
- Source:
trigger selector.
Type:
- String
(inner) scaleid :Number
- Description:
Current scale ID.
- Source:
Current scale ID.
Type:
- Number
(inner) scalevalues :Array
- Description:
ID and name of the scales.
- Source:
ID and name of the scales.
Type:
- Array
(inner) {Number)
Methods
(inner) getScaleValues(scaleid) → {Promise}
- Description:
Get the scale values for the selected scale.
- Source:
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}
- Description:
Main initialisation.
- Source:
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)
- Description:
Initialises the scale configuration dialogue.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
popup |
Dialogue | Dialogue object to initialise. |
(inner) retrieveOriginalScaleConfig() → {Object|String}
- Description:
Gets the original scale configuration if it was set.
- Source:
Returns:
scale configuration or empty string.
- Type
- Object | String
(inner) scaleChangeHandler(e)
- Description:
Triggered when a scale is selected.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
(inner) setScaleConfig()
- Description:
Set the scale configuration back into a JSON string in the hidden element.
- Source:
(inner) showConfig()
- Description:
Displays the scale configuration dialogue.
- Source: