new GOWN.InputWrapper()
Wrapper for DOM Text Input.
Based on PIXI.Input InputObject by Sebastian Nette,
see https://github.com/SebastianNette/PIXI.Input
Members
-
staticGOWN.InputWrapper.hiddenInputHTMLInputElement
-
DOM input field. We use one input field for all InputControls
Methods
-
staticGOWN.InputWrapper.blur()
-
Blur the text input
-
staticGOWN.InputWrapper.focus()
-
Focus the text input
-
staticGOWN.InputWrapper.getSelection(){Array.<Number>}
-
Get the start and end of the current selection
Returns:
Type Description Array.<Number> The start and end of the current selection -
staticGOWN.InputWrapper.getText(){String}
-
Get the text value from the hidden input
Returns:
Type Description String The text value -
staticGOWN.InputWrapper.getType(){String}
-
Get the input type of the hidden input
Returns:
Type Description String The input type -
staticGOWN.InputWrapper.setCursorPos()
-
Set the cursor position of the hidden input
-
staticGOWN.InputWrapper.setMaxLength(length)
-
Set the maximum length. Setting it to 0 will allow unlimited text input
Name Type Description length
Number The maximum length -
staticGOWN.InputWrapper.setSelection(start, end)
-
Set the new selection
Name Type Description start
Number First position end
Number Last position -
staticGOWN.InputWrapper.setText(text)
-
Set the text value of the hidden input
Name Type Description text
String The text to set {String} -
staticGOWN.InputWrapper.setType(type)
-
Set the input type of the hidden input
Name Type Description type
String The new type for the hidden input