Neo4j Visualization Library
    Preparing search index...

    Function getZoomTargetForNodePositions

    • 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, used to pad 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.