LiveFlow.Paths.Step (LiveFlow v0.3.2)

Copy Markdown View Source

Step/orthogonal path calculation for edges.

Creates paths with 90-degree angles. It shares the routing algorithm with LiveFlow.Paths.Smoothstep (a port of xyflow's getSmoothStepPath) using a border radius of 0, exactly like xyflow's step edge.

Options

  • :offset - Distance the path travels out of a handle before turning (default: 20)
  • :step_position - Where the bend happens between source (0.0) and target (1.0) (default: 0.5)
  • :center_x / :center_y - Force the bend through a specific coordinate

Summary

Functions

Calculates a step path between two points with explicit positions.

Functions

path(source_x, source_y, source_position, target_x, target_y, target_position, opts \\ [])

@spec path(number(), number(), atom(), number(), number(), atom(), keyword()) :: map()

Calculates a step path between two points with explicit positions.