@samatawy/diagrams
    Preparing search index...

    Class ToolsetRegistry

    ToolsetRegistry is a holder of toolbox configurations for the diagram editor. It allows for registering, retrieving, and unregistering toolsets based on their name. This enables the diagram system to support various toolsets and their associated configurations in a modular way.

    Toolsets should be registered with a unique name (will be used as a label) that identifies the toolset. The registry can then be used to customize diagram editor instances.

    The global instance of the ToolsetRegistry can be accessed via ToolsetRegistry.global, which allows for registering toolsets that are available across all diagram editor instances without explicitly passing them.

    Example usage:

    ToolsetRegistry.global.register({ name: 'Basic', layout: ['select', 'rectangle', 'text', 'line'] }); const defaultEditor = new DiagramEditor({ host: document.getElementById('editor') });

    const bpmnToolset = new ToolsetRegistry(); bpmnToolset.register([ { name: 'Basic', layout: ['select', 'rectangle', 'text', 'line'] }, { name: 'BPMN', layout: ['task', 'event', 'gateway'] }, ])

    const bpmnEditor = new DiagramEditor({ host: document.getElementById('editor'), toolsets: bpmnToolset.registeredToolsets() });

    Index

    Constructors

    Accessors

    Methods

    • Unregisters a toolset by its name.

      Parameters

      • name: string

        The name of the toolset to unregister.

      Returns void