turbodombuilder - v0.9.5
    Preparing search index...

    Class TurboInteractor<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

    keyName: string

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

    target: Node
    toolName: string
    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.

    Methods

    • initialize

      Returns void

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

    • Parameters

      Returns void

      Fired on click start

    • Parameters

      Returns void

      Fired on click

    • Parameters

      Returns void

      Fired on click end

    • Parameters

      Returns void

      Fired on pointer move

    • Parameters

      Returns void

      Fired on drag start

    • Parameters

      Returns void

      Fired on drag

    • Parameters

      Returns void

      Fired on drag end

    • Protected

      setupChangedCallbacks

      Returns void

      Setup method intended to initialize change listeners and callbacks.