Class: Input

Input()

new Input()

User Interface input for math expressions
Source:

Extends

  • Component

Members

(static) value

get value - Return a evaluation of the compiled expression
Source:

Methods

(static) 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.
Source:
Returns:
Type
void

(static) getAliasKnowSymbol(input, symbol) → {string}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
symbol char utf8 char symbol like 'π'
Source:
Returns:
alias like 'pi'
Type
string

(static) getHighlightKnowAtoms(input, name) → {string}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
name string atom name
Source:
Returns:
html content
Type
string

(static) getHighlightKnowMethods(input, r) → {string}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
r string method name
Source:
Returns:
html content
Type
string

(static) getHighlightKnowVariables(input, r) → {string}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
r string variable name
Source:
Returns:
html content
Type
string

(static) getSymbolKnowAlias(input, alias) → {char}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
alias string alias like 'pi'
Source:
Returns:
utf8 char symbol like 'π'
Type
char

(static) getVariableKnowAlias(input, alias) → {object}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
alias string alias like 'pi'
Source:
Returns:
the variable object
Type
object

(static) getVariableKnowSymbol(input, symbol) → {object}

Parameters:
Name Type Description
input Cluster.Ui.Input cluster-input object
symbol char utf8 char symbol like 'π'
Source:
Returns:
the variable object
Type
object

(static) setKnowAtoms(list) → {void}

setKnowAtoms - set know "atom" keywords to highlight
Parameters:
Name Type Description
list array A formatted list of know atoms
Source:
Returns:
Type
void

(static) setKnowVariables(list) → {void}

setKnowVariables - set know variables to aliasing and highlight
Parameters:
Name Type Description
list type list of know variables
Source:
Returns:
Type
void

(static) updateContent(valueopt) → {void}

updateContent - update highlight of current content, or specified content
Parameters:
Name Type Attributes Description
value type <optional>
A specified value
Source:
Returns:
Type
void