Members
value
get value - Return a evaluation of the compiled expression
Methods
compile() → {void}
After each change of the input field, this function is called and compiles the entered expression.
If it returns an error the event "error" is launched, otherwise if all happens normally the event "success" is launched.
The method will store a value in "this.compiled" that can be evaluated by the getter "value",
thus offering a much higher computation speed.
The method will check the entered unit and if it does not match the quantity entered in the "type" attribute,
it will return an "invalid measure" error.
Returns:
- Type
- void
getAliasKnowSymbol(input, symbol) → {string}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
symbol |
char | utf8 char symbol like 'π' |
Returns:
alias like 'pi'
- Type
- string
getHighlightKnowAtoms(input, name) → {string}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
name |
string | atom name |
Returns:
html content
- Type
- string
getHighlightKnowMethods(input, r) → {string}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
r |
string | method name |
Returns:
html content
- Type
- string
getHighlightKnowVariables(input, r) → {string}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
r |
string | variable name |
Returns:
html content
- Type
- string
getSymbolKnowAlias(input, alias) → {char}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
alias |
string | alias like 'pi' |
Returns:
utf8 char symbol like 'π'
- Type
- char
getVariableKnowAlias(input, alias) → {object}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
alias |
string | alias like 'pi' |
Returns:
the variable object
- Type
- object
getVariableKnowSymbol(input, symbol) → {object}
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Cluster.Ui.Input | cluster-input object |
symbol |
char | utf8 char symbol like 'π' |
Returns:
the variable object
- Type
- object
setKnowAtoms(list) → {void}
setKnowAtoms - set know "atom" keywords to highlight
Parameters:
| Name | Type | Description |
|---|---|---|
list |
array | A formatted list of know atoms |
Returns:
- Type
- void
setKnowVariables(list) → {void}
setKnowVariables - set know variables to aliasing and highlight
Parameters:
| Name | Type | Description |
|---|---|---|
list |
type | list of know variables |
Returns:
- Type
- void
updateContent(valueopt) → {void}
updateContent - update highlight of current content, or specified content
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
type |
<optional> |
A specified value |
Returns:
- Type
- void