turbodombuilder - v0.9.22
    Preparing search index...

    Type Alias MakeToolOptions

    Options used to create a new tool attached to an element via makeTool.

    type MakeToolOptions = {
        onActivate?: () => void;
        onDeactivate?: () => void;
        activationEvent?: DefaultEventNameEntry;
        clickMode?: ClickMode;
        customActivation?: (
            element: Turbo<Element>,
            manager: TurboEventManager,
        ) => void;
        key?: string;
        manager?: TurboEventManager;
    }
    Index

    Properties

    onActivate?: () => void

    Function to execute when the tool is activated.

    onDeactivate?: () => void

    Function to execute when the tool is deactivated.

    activationEvent?: DefaultEventNameEntry

    Custom activation event to listen to. Defaults to the default click event name.

    clickMode?: ClickMode

    Click mode that will hold this tool when activated. Defaults to ClickMode.left.

    customActivation?: (element: Turbo<Element>, manager: TurboEventManager) => void

    Custom activation function. If provided, is called with (el, manager) to define when the tool is activated.

    key?: string

    Optional keyboard key to map to this tool. When pressed, it will be set as the current key tool.

    The event manager instance this tool should register against. Defaults to TurboEventManager.instance.