@benportner/js_family_tree
    Preparing search index...

    Class D3Renderer

    D3Renderer is responsible for rendering the family tree using D3. It handles SVG creation, zoom/pan, node and link rendering, tooltips, and labels.

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    opts: D3RendererOptions = ...

    Default renderer options, can be overwritten via the constructor.

    Accessors

    • get container(): HTMLElement

      Gets the current container element.

      Returns HTMLElement

    • set container(c: HTMLElement): void

      Sets the container element and initializes the SVG and tooltip.

      Parameters

      • c: HTMLElement

      Returns void

    Methods

    • Deletes all rendered elements from the SVG.

      Returns void

    • Main render function. Draws the current layout, updates nodes and links, tooltips, and labels. Also centers the view on the clicked node unless running in JSDOM.

      Parameters

      • layoutResult: LayoutResult

        The layout result to render.

      • OptionalpreviousPosition: Coordinates

        Optional previous position for transitions.

      • OptionalnewPosition: Coordinates

        Optional new position for transitions.

      Returns void