Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BidiHandler

This object is used to ensure Bi-Directional support (for languages with text flowing from right to left, like Arabic or Hebrew) including correct caret positioning, text selection mouse and keyboard arrows functioning

Hierarchy

  • BidiHandler

Index

Constructors

constructor

Methods

getPosLeft

  • getPosLeft(col: Number): number
  • Returns offset of character at position defined by column.

    Parameters

    • col: Number

      the screen column position

    Returns number

    horizontal pixel offset of given screen column

getSelections

  • getSelections(startCol: Number, endCol: Number): Object[]
  • Returns 'selections' - array of objects defining set of selection rectangles

    Parameters

    • startCol: Number

      the start column position

    • endCol: Number

      the end column position

    Returns Object[]

    Each object contains 'left' and 'width' values defining selection rectangle.

isBidiRow

  • isBidiRow(screenRow: any, docRow: any, splitIndex: any): any
  • Returns 'true' if row contains Bidi characters, in such case creates Bidi map to be used in operations related to selection (keyboard arrays, mouse click, select)

    Parameters

    • screenRow: any
    • docRow: any
    • splitIndex: any

    Returns any

markAsDirty

  • markAsDirty(): void

offsetToCol

  • offsetToCol(posX: Number): Number
  • Converts character coordinates on the screen to respective document column number

    Parameters

    • posX: Number

      character horizontal offset

    Returns Number

    screen column number corresponding to given pixel offset

updateCharacterWidths

  • updateCharacterWidths(fontMetrics: any): void
  • Updates array of character widths

    Parameters

    • fontMetrics: any

    Returns void

Generated using TypeDoc