turbodombuilder - v0.9.66
    Preparing search index...

    Class TurboOperator<ElementType, ViewType, ModelType, EmitterType>

    TurboOperator

    The MVC base operator 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 or any other internal events. It can only communicate with other operators via the emitter (by firing or listening for changes on a certain key).

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    keyName: string

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

    element: ElementType

    The element it is bound to.

    view: ViewType

    The MVC view.

    model: ModelType

    The MVC model.

    emitter: EmitterType

    The MVC emitter.

    Methods

    • Protected Function

      setup

      Returns void

      Called in the constructor. Use for setup that should happen at instantiation, before this.initialize() is called.

    • Function

      initialize

      Returns void

      Initializes the operator. Specifically, it will set up the change callbacks.

    • Protected Function

      setupUIListeners

      Returns void

      Setup method for defining DOM and input event listeners.

    • Protected Function

      setupChangedCallbacks

      Returns void

      Setup method intended to initialize change listeners and callbacks.