algodynamics-iiith/elm-dsview/1.0.0

Layout.Attributes

Layout Configuration Attributes

Types

= TB
| BT
| LR
| RL

This type represents the directions of representation , wherein TB stands for Top-to-Bottom, BT stands for Bottom-to-Top, LR stands for Left-to-Right and RL stands for Right-to-Left

type alias LayoutConfig =
{ widthDict : Dict Int Float
, heightDict : Dict Int Float
, width : Float
, height : Float
, marginX : Float
, marginY : Float
, elemDistX : Float
, elemDistY : Float
, direction : Direction
, wrapVal : Maybe Int
}

This type represents the layout configurations of the drawer

Attributes

These function set the respective attributes for the algorithm

widthDict : Dict Int Float -> Attribute { b | widthDict : Dict Int Float }

The widthDict associates nodes with a width that will be used during the layout.

The default value is Dict.empty

heightDict : Dict Int Float -> Attribute { b | heightDict : Dict Int Float }

The heightDict associates nodes with a height that will be used during the layout.

The default value is Dict.empty

width : Float -> Attribute { b | width : Float }

Defines the default width that will be used during the layout. This value will be used when no value is available in widthDict for some node.

The default value is 60 pixels

height : Float -> Attribute { b | height : Float }

Defines the default height that will be used during the layout. This value will be used when no value is available in heightDict for some node.

The default value is 60 pixels

marginX : Float -> Attribute { b | marginX : Float }

Defines the number of pixels to use as a margin around the left and right of the Array.

The default value is 50 pixels

marginY : Float -> Attribute { b | marginY : Float }

Defines the number of pixels to use as a margin around the top and bottom of the Array.

The default value is 50 pixels

elemDistX : Float -> Attribute { b | elemDistX : Float }

Defines Relative distance between elements of array in x-axis direction

The default value is 50 pixels

elemDistY : Float -> Attribute { b | elemDistY : Float }

Defines Relative distance between elements of array in y-axis direction

The default value is 50 pixels

direction : Direction -> Attribute { b | direction : Direction }

Defines array layout direction i.e LR, RL, TB, BT

The default value is LR

wrapVal : Maybe Int -> Attribute { b | wrapVal : Maybe Int }

Defines the number of nodes to be wrapped in a row before moving to next row

The default value is Nothing