React Advanced Odontogram - v2.2.1
    Preparing search index...

    Type Alias OdontogramPlugin

    Custom SVG plugin definition for the Odontogram engine.

    Plugins can inject custom SVG content into each tooth's rendering and maintain per-tooth custom state that is automatically included in JSON export/import.

    const implantBrandPlugin: OdontogramPlugin = {
    id: "implant-brand",
    label: { hu: "Implantátum márka", en: "Implant brand", de: "Implantat-Marke", ... },
    layer: "overlay",
    renderSvg: (toothNo, _quadrant, customState) => {
    if (!customState?.brand) return null;
    return `<text x="16" y="60" font-size="6" fill="#3b7bff">${customState.brand}</text>`;
    },
    };
    type OdontogramPlugin = {
        id: string;
        label: Partial<Record<Language, string>>;
        layer: PluginLayer;
        panelSection?: "custom";
        renderSvg: (
            toothNo: number,
            quadrant: 1 | 2 | 3 | 4,
            customState: unknown,
        ) => string | null | undefined;
    }
    Index

    Properties

    id: string

    Unique plugin identifier (used as key in customStates).

    label: Partial<Record<Language, string>>

    Localized display label for the plugin (shown in the state tooltip).

    SVG layer where this plugin's output will be rendered.

    panelSection?: "custom"

    Optional: which panel section this plugin adds controls to. When set to "custom", the engine will render a dedicated panel section for the plugin (future expansion).

    renderSvg: (
        toothNo: number,
        quadrant: 1 | 2 | 3 | 4,
        customState: unknown,
    ) => string | null | undefined

    Render SVG markup for a specific tooth. Return an SVG fragment string (will be wrapped in a <g> element) or null/undefined to render nothing.

    Type Declaration

      • (
            toothNo: number,
            quadrant: 1 | 2 | 3 | 4,
            customState: unknown,
        ): string | null | undefined
      • Parameters

        • toothNo: number

          The FDI tooth number (11–48).

        • quadrant: 1 | 2 | 3 | 4

          The quadrant (1–4) derived from the tooth number.

        • customState: unknown

          The plugin's custom state for this tooth, or undefined.

        Returns string | null | undefined