Class ToolController

Implements

  • InputEventListener

Methods

  • Add a tool that acts like one of the primary tools (only one primary tool can be enabled at a time).

    If the tool is already added to this, the tool is converted to a primary tool.

    This should be called before creating the app's toolbar.

    Parameters

    Returns void

  • Add a tool to the end of this' tool list (the added tool receives events after tools already added to this). This should be called before creating the app's toolbar.

    If options.addToFront, the tool is added to the beginning of this' tool list.

    Does nothing if the tool is already present.

    Parameters

    • tool: BaseTool
    • Optionaloptions: { addToFront: boolean }

    Returns void

  • Removes a tool from this' tool list and replaces it with replaceWith.

    If any of toolsToInsert have already been added to this, the tools are moved.

    This should be called before creating the editor's toolbar.

    Parameters

    Returns void

OpenSource licenses