Module

DataViz.Layout.StateMachine.Path

Package
purescript-hylograph-layout
Repository
afcondon/purescript-hylograph-layout

DataViz.Layout.StateMachine.Path

SVG path generation for state machine diagrams. Converts layout positions into SVG path strings.

#transitionPathD Source

transitionPathD :: TransitionPath -> String

Generate SVG path d attribute for a transition arrow Uses quadratic bezier curve

#selfLoopPathD Source

selfLoopPathD :: TransitionPath -> String

Generate SVG path for a self-loop Uses an SVG arc for a clean circular loop The arc radius is computed from the distance between start and control points

#arrowheadPathD Source

arrowheadPathD :: Number -> Number -> Number -> Number -> String

Generate SVG path for an arrowhead at the end of a transition Creates a simple triangle pointing in the direction of the arrow

#initialArrowPathD Source

initialArrowPathD :: { angle :: Number, x :: Number, y :: Number } -> Number -> String

Generate SVG path for the initial state arrow A simple horizontal arrow pointing right

#stateEllipse Source

stateEllipse :: StatePosition -> { cx :: Number, cy :: Number, rx :: Number, ry :: Number }

Get ellipse attributes for a state Returns { cx, cy, rx, ry } ready for SVG ellipse element

#stateFinalRing Source

stateFinalRing :: StatePosition -> Number -> { cx :: Number, cy :: Number, rx :: Number, ry :: Number }

Get the inner ring for a final state (double circle effect) Returns slightly smaller ellipse attributes