algodynamics-iiith/elm-dsview/1.0.0

ArrayView

This module is utilized to render the visualization of the array.

Drawers

This type represents a function that translates element/Node Attributes to Svg.

Configuration Attributes

List (Attribute LayoutConfig)
-> List (Attribute (DrawConfig n e msg))
-> Array n
-> Html msg

This function draws the Array as SVG using the elm-dagre library. It takes List of LayoutConfig attributes as the first argument, and drawers/styles as the second attribute and the Array as the third. The standard drawers are used as the default drawers.

-- The simplest example of its usage is
draw [] [] arr
runArrayLayout : List (Attribute LayoutConfig) -> Array n -> ArrayLayout

This function computes the layout for the elements of array using runLayout API exposed by elm-dagre.

This function takes list of LayoutConfig attributes and an array and outputs the ArrayLayout

runArrayLayout [] arr
type alias ArrayLayout =
{ width : Float
, height : Float
, coordDict : Dict Int ( Float, Float )
, dagreAttr : List Attribute
}

This type defines array layout