Provides helper functions to initially position an element.

interface InitialSystem {
    constrain: boolean;
    element: HTMLElement;
    enabled: boolean;
    height: number;
    get locked(): boolean;
    width: number;
    getLeft(width: number): number;
    getTop(height: number): number;
    setDimension(width: number, height: number): void;
}
Hierarchy

Accessors

  • get constrain(): boolean
  • Returns boolean

    The current constrain state.

  • set constrain(constrain): void
  • Parameters

    • constrain: boolean

      Set constrain state.

    Returns void

  • get element(): HTMLElement
  • Returns HTMLElement

    Target element.

  • set element(element): void
  • Parameters

    Returns void

  • get enabled(): boolean
  • Returns boolean

    Get enabled state.

  • set enabled(enabled): void
  • Parameters

    • enabled: boolean

      Set enabled state.

    Returns void

  • get height(): number
  • Returns number

    Get manual height.

  • set height(height): void
  • Parameters

    • height: number

      Set manual height.

    Returns void

  • get locked(): boolean
  • Returns boolean

    Get locked state.

  • get width(): number
  • Returns number

    Get manual width.

  • set width(width): void
  • Parameters

    • width: number

      Set manual width.

    Returns void

Methods

  • Get the left constraint.

    Parameters

    • width: number

      Target width.

    Returns number

    Calculated left constraint.

  • Get the top constraint.

    Parameters

    • height: number

      Target height.

    Returns number

    Calculated top constraint.

  • Set manual width & height.

    Parameters

    • width: number

      New manual width.

    • height: number

      New manual height.

    Returns void