@samatawy/diagrams
    Preparing search index...

    Class IconRegistry

    Registry of icon sources used by editor and toolbar components.

    Index

    Constructors

    Methods

    • Register a symbol-defined icon. The symbol markup is converted to an inline SVG so no sprite injection is needed.

      Parameters

      • id: string

        The icon identifier.

      • _symbolId: string

        The symbol identifier (unused).

      • symbolMarkup: string

        The SVG symbol markup.

      Returns void

    • Register a standalone SVG string as an icon.

      Parameters

      • id: string

        The icon identifier.

      • markup: string

        The SVG markup string.

      Returns void

    • Register an external URL as an icon.

      Parameters

      • id: string

        The icon identifier.

      • src: string

        The URL of the icon.

      Returns void

    • Checks if an icon with the given identifier is registered.

      Parameters

      • id: string

        The icon identifier.

      Returns boolean

      True if the icon is registered, false otherwise.

    • Returns an Element rendering the icon inline, or null if not found.

      Parameters

      • id: string

        The icon identifier.

      • Optionalsize: number

        The desired size of the icon in pixels.

      Returns Element | null

      An Element representing the icon, or null if not found.