turbodombuilder - v0.9.5
    Preparing search index...

    Class TurboTool<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 tool. Used to retrieve it in the main component. If not set, if the element's class name is MyElement and the tool's class name is MyElementSomethingTool, the key would default to "something".

    toolName: string
    embeddedTarget: Node
    activationEvent: string
    clickMode: ClickMode
    key: string

    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.

    • Returns void

    • Returns void

    • Parameters

      Returns boolean

      Fired on click start

    • Parameters

      Returns boolean

      Fired on click

    • Parameters

      Returns boolean

      Fired on click end

    • Parameters

      Returns boolean

      Fired on pointer move

    • Parameters

      Returns boolean

      Fired on drag start

    • Parameters

      Returns boolean

      Fired on drag

    • Parameters

      Returns boolean

      Fired on drag end