MRTextInputEntity

MRTextInputEntity ⇐ MRTextEntity

The text element / TODO /

Kind: global class
Extends: MRTextEntity

mrTextInputEntity.MRTextInputEntity

Kind: instance class of MRTextInputEntity

new exports.MRTextInputEntity()

Constructor for the textArea entity component.

mrTextInputEntity.value ⇒ string

Kind: instance property of MRTextInputEntity
Returns: string - value - the value of the current text input

mrTextInputEntity.value

Kind: instance property of MRTextInputEntity

mrTextInputEntity.createHiddenInputElement()

Kind: instance method of MRTextInputEntity

mrTextInputEntity.fillInHiddenInputElementWithUserData()

Kind: instance method of MRTextInputEntity

mrTextInputEntity.updateTextDisplay()

Kind: instance method of MRTextInputEntity

mrTextInputEntity.connected()

(async) handles setting up this textarea once it is connected to run as an entity component.

Kind: instance method of MRTextInputEntity

mrTextInputEntity._createCursorObject()

Kind: instance method of MRTextInputEntity

mrTextInputEntity.handleKeydown(event)

Kind: instance method of MRTextInputEntity

Param Type Description
event event the keydown event

mrTextInputEntity.handleMouseClick(event)

Kind: instance method of MRTextInputEntity

Param Type Description
event event the keydown event

mrTextInputEntity.focus(isPureFocusEvent)

Kind: instance method of MRTextInputEntity

Param Type Default Description
isPureFocusEvent boolean false Boolean to allow us to update the cursor position with this function directly. Otherwise, we assume there’s other things happening after focus was called as part of the event and that the cursor position will be handled there instead.

mrTextInputEntity.blur()

Kind: instance method of MRTextInputEntity

mrTextInputEntity.setupEventListeners()

Kind: instance method of MRTextInputEntity

mrTextInputEntity.updateCursorPosition(fromCursorMove, isNewLine)

Updates the cursor position based on click and selection location.

Kind: instance method of MRTextInputEntity

Param Type Default Description
fromCursorMove boolean false false by default. Used to determine if we need to run based off a text object update sync or we can directly grab information. This requirement occurs because the sync isnt usable if no text content changed.
isNewLine boolean false false by default. Used to determine if the new character added was a newline character to try to augment the cursor position to something the user would recognize since troika places it in a weird spot until the next character is entered.