Constructor
new Numberbox(container, oopt)
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
container |
object | DOM container for the widget. | ||||||||||||||||||||||||||||||||||||||||||||||
o |
object |
<optional> |
Options.
Properties
|
- Implements:
- Widget
- Source:
Methods
_editSelectAll()
Function called when 'select all' is invoked.
- Source:
(private) _getPowerOfSelectedDigit(charNum) → {number}
Returns the power of the selected digit.
Parameters:
| Name | Type | Description |
|---|---|---|
charNum |
number | The index of the selected digit. |
- Source:
Returns:
- Power of the selected digit.
- Type
- number
(private) _getSelectedCharNumber(clientX, clientY) → {number}
Returns the number of the selected character in the text box based on the client mouse x and y position.
Parameters:
| Name | Type | Description |
|---|---|---|
clientX |
number | |
clientY |
number |
- Source:
Returns:
- Index of the selected digit.
- Type
- number
(private) _initHandlers()
Initializes mouse and touch event handlers.
- Source:
(private) _initOptions()
Initializes the options.
- Source:
(private) _initState()
Initializes the state.
- Source:
(private) _initStateConstraints()
Initializes state constraints.
- Source:
(private) _initSvgEls()
Initializes the svg elements.
- Source:
(private) _update()
Updates (redraws) components based on state.
- Source:
getVal() → {number}
Returns the current value.
- Source:
Returns:
- Current value.
- Type
- number
setInternalVal(newVal)
Sets the current value.
Same as setVal(), but will not cause an observer callback trigger.
Parameters:
| Name | Type | Description |
|---|---|---|
newVal |
number | The new value. |
- Source:
setVal(newVal)
Sets the current value.
Same as setInternalVal(), but will cause an observer callback trigger.
Parameters:
| Name | Type | Description |
|---|---|---|
newVal |
number | The new value. |
- Source:
toString() → {string}
Returns a string representation of the value.
- Source:
Returns:
- String representation of the value.
- Type
- string