Gets the zoom target to fit the given node positions into the scene.

  • Parameters

    • nodePositions: Point[]

      The node positions.

    • containerWidth: number

      The width of the container NVL is displayed in.

    • containerHeight: number

      The height of the container NVL is displayed in.

    • maxNodeRadius: number = ...

      The maximum node radius, which is added as margin to the scene (defaults to 50).

    Returns {
        panX: number;
        panY: number;
        zoom: number;
    }

    The zoom and pan targets.

    • panX: number

      The x-coordinate of the pan.

    • panY: number

      The y-coordinate of the pan.

    • zoom: number

      The zoom level.