Class BaseToolAbstract

Hierarchy (view full)

Implements

  • InputEventListener

Constructors

Properties

description: string

Methods

  • Override this to allow this tool to be enabled in a read-only editor

    Returns boolean

  • Returns a ReactiveValue that updates based on whether this tool is enabled.

    Returns ReactiveValue<boolean>

    Example

    const tool = new SomeTool();

    // Watch for changes in enabled status
    tool.enabledValue().onUpdate(enabled => doSomething(enabled));
  • Called when the tool is removed/when the editor is destroyed. Subclasses that override this method must call super.onDestroy().

    Returns void

  • Returns true iff the tool handled the event and thus should receive additional events.

    Parameters

    Returns boolean

  • Returns true iff there are additional pointers down and the tool should remain active to handle the additional events.

    For most purposes, this should return false or nothing.

    Parameters

    Returns boolean | void

  • Parameters

    • mapper: null | default

    Returns void

  • Connect this tool to a set of other tools, ensuring that at most one of the tools in the group is enabled.

    Parameters

    Returns void

Generated using TypeDoc

OpenSource licenses