turbodombuilder - v0.9.5
    Preparing search index...

    Class TurboSubstrate<ElementType, ViewType, ModelType, EmitterType>

    TurboController

    The MVC base controller class. Its main job is to handle (some part of or all of) the logic of the component. It has access to the element, the model to read and write data, the view to update the UI, and the emitter to listen for changes in the model. It can only communicate with other controllers via the emitter (by firing or listening for changes on a certain key).

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    element: ElementType

    A reference to the component.

    view?: ViewType

    A reference to the MVC view.

    model?: ModelType

    A reference to the MVC model.

    emitter?: EmitterType

    A reference to the MVC emitter.

    keyName: string

    The key of the substrate. Used to retrieve it in the main component. If not set, if the element's class name is MyElement and the substrate's class name is MyElementSomethingSubstrate, the key would default to "something".

    substrateName: string
    solverKeys: string[] = []

    Accessors

    Methods

    • Protected

      setupChangedCallbacks

      Returns void

      Setup method intended to initialize change listeners and callbacks.

    • initialize

      Returns void

      Initializes the controller. Specifically, it will setup the change callbacks.

    • Parameters

      • object: object

      Returns void

    • Parameters

      • object: object

      Returns Turbo<Node>

    • Parameters

      • object: object

      Returns boolean

    • Parameters

      • object: object

      Returns boolean

    • Parameters

      • callback: (...args: any[]) => any

      Returns void

    • Parameters

      • callback: (...args: any[]) => any

      Returns void

    • Returns void

    • Returns void

    • Returns void