jcberentsen/elm-wiring-diagrams/3.1.0

NOTE: the latest version is 5.4.7

WiringDiagram.Layout

Layout of WiringDiagram values

Typically a Layout can be converted to SVG for display

Definition

type alias Layout a =
Layout a

The Layout type keeps information about the layout of a Wiring diagram.

empty : Layout a

An empty Layout

Simple Layout of a Diagram

layoutDiagram : Diagram a -> Layout a

Layout a Diagram with default configuration

Customized Layout of a Diagram

layoutDiagramWithConfig : Config a -> Diagram a -> Layout a

Layout a Diagram with custom configuration

Misc

type alias Polarity =
Polarity

Polarity of a Port. Is the port going In or Out of something

portPositionsOfBox : Polarity -> Box a -> List ( Int, Pos )

List the port positions of a Box, given a Polarity (In,Out)

incoming : Polarity

Polarity of a Port that is incoming

outgoing : Polarity

Polarity of a Port that is outgoing