turbodombuilder - v0.9.5
    Preparing search index...

    Class TurboDrawer<ViewType, DataType, ModelType, EMitterType>

    TurboElement

    Base TurboElement class, extending the base HTML element with a few powerful tools and functions.

    Type Parameters

    • ViewType extends TurboView = TurboView<any, any>

      The element's view type, if initializing MVC.

    • DataType extends object = object

      The element's data type, if initializing MVC.

    • ModelType extends TurboModel = TurboModel

      The element's model type, if initializing MVC.

    • EMitterType extends TurboEmitter = TurboEmitter

      The element's emitter type, if initializing MVC.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    resizeObserver: ResizeObserver
    transition: Reifect
    selected: boolean

    Whether the element is selected or not.

    initialized: boolean
    view: ViewType

    The view (if any) of the element. Only when initializing MVC.

    model: ModelType

    The model (if any) of the element. Only when initializing MVC.

    data: DataType

    The main data block (if any) attached to the element, taken from its model (if any). Only when initializing MVC.

    dataId: string

    The ID of the main data block (if any) of the element, taken from its model (if any). Only when initializing MVC.

    dataIndex: number

    The numerical index of the main data block (if any) of the element, taken from its model (if any). Only when initializing MVC.

    dataSize: number

    The size (number) of the main data block (if any) of the element, taken from its model (if any). Only when initializing MVC.

    unsetDefaultClasses: boolean
    config: TurboElementConfig = ...

    Static configuration object.

    mvc: Mvc<
        TurboDrawer<ViewType, DataType, ModelType, EMitterType>,
        ViewType,
        DataType,
        ModelType,
        EMitterType,
    > = ...

    The MVC handler of the element. If initialized, turns the element into an MVC structure.

    onAttach: Delegate<() => void> = ...

    Delegate fired when the element is attached to DOM.

    onDetach: Delegate<() => void> = ...

    Delegate fired when the element is detached from the DOM.

    onAdopt: Delegate<() => void> = ...

    Delegate fired when the element is adopted by a new parent in the DOM.

    Accessors

    • set hideOverflow(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • set attachSideToIconName(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • set rotateIconBasedOnSide(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • set side(value: Side): void

      Parameters

      Returns void

    • get isVertical(): boolean

      Returns boolean

    • set open(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    Methods

    • initialize

      Returns void

      Initializes the element.

    • Protected

      setupUIElements

      Returns void

      Setup method intended to initialize all direct sub-elements attached to this element, and store them in fields.

    • Protected

      setupUILayout

      Returns void

      Setup method to create the layout structure of the element by adding all created sub-elements to this element's child tree.

    • Protected

      setupUIListeners

      Returns void

      Setup method to initialize and define all input/DOM event listeners of the element.

    • Parameters

      Returns Side

    • Parameters

      Returns Side

    • Returns void

    • Protected

      getPropertiesValue

      Type Parameters

      • Type

      Parameters

      • propertiesValue: Type

        The actual value; could be null.

      • OptionalconfigFieldName: string

        The field name of the associated value in the static config. Will be returned if the actual value is null.

      • OptionaldefaultValue: Type

        The default fallback value. Will be returned if both the actual and config values are null.

      Returns Type

      Returns the value with some fallback mechanisms on the static config field and a default value.

    • Returns void

    • Parameters

      Returns void

      Update the class's static configurations. Will only overwrite the set properties.

    • Protected

      setupChangedCallbacks

      Returns void

      Setup method intended to initialize change listeners and callbacks.