Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SfTextDirectionDirective

API reference for SfTextDirectionDirective

import {SfCommonModule} from "@progress/sitefinity-component-framework";


attribute: sfTextDirection description: Sets proper direction of text

Hierarchy

  • SfTextDirectionDirective

Index

Constructors

constructor

  • Parameters

    • element: ElementRef

    Returns SfTextDirectionDirective

Properties

Private element

element: ElementRef

Accessors

textDirectionValue

  • set textDirectionValue(value: any): void
  • Sets the text value and determines text direction

    Parameters

    • value: any

    Returns void

Methods

Private determineDirection

  • determineDirection(ch: string, el: HTMLElement): void
  • Determines text direction and toggles RTL class

    Parameters

    • ch: string
    • el: HTMLElement

    Returns void

Private getFirstLetter

  • getFirstLetter(text: string): string
  • Returns the first symbol of text if it is a letter

    Parameters

    • text: string

    Returns string

Private isLetter

  • isLetter(ch: string): boolean
  • Checks if symbol is a letter

    Parameters

    • ch: string

    Returns boolean

Private setDirection

  • setDirection(ch: string, el: HTMLElement): void
  • Toggles RTL class

    Parameters

    • ch: string
    • el: HTMLElement

    Returns void

Private shouldBeRTL

  • shouldBeRTL(ch: string): boolean
  • Checks if text should be right to left

    Parameters

    • ch: string

    Returns boolean

Generated using TypeDoc