peterszerzo/elm-arborist/2.3.1

NOTE: this package is not compatible with Elm 0.19.1

Arborist.Settings

Various settings for the editor, defined at the time of initialization, or added at any time later in the program. Includes various geometric settings such as canvas dimensions and the gutter between nodes, and, in a later version of this package, more functional settings such as hiding placeholder nodes.

nodeWidth : Int -> Setting

Sets the width of node.

nodeHeight : Int -> Setting

Sets the width of node.

canvasWidth : Int -> Setting

Sets the width of the canvas.

canvasHeight : Int -> Setting

Sets the height of the canvas.

level : Int -> Setting

Vertical distance between the bottom of a parent node and the top of its child.

gutter : Int -> Setting

Horizontal gutter between nodes.

centerOffset : Int -> Int -> Setting

When a node is activated, the interface centers it automatically. Sometimes, though, it is useful to move it somewhere other than the center, e.g. to accommodate a large pop-up underneath. With this configuration option, you can specify this offset, horizontal first, vertical second.

connectorStrokeAttributes : List (Attribute Never) -> Setting

Use this to specify SVG stroke attributes that will be applied for all paths linking nodes together, e.g:

connectorStrokeAttributes [ strokeWidth "3", stroke "#EFEFEF", strokeLinecap "round" ]

Note the Never in the type signature: the compiler won't allow any event handlers with messages. Those are swallowed with an Html.Attributes.map.

dragAndDrop : Bool -> Setting

Enable or disable drag and drop with this boolean flag (True is enabled, which is the default value). Note that the tree can still be panned if drag and drop is disabled.

placeholderLeaves : Bool -> Setting

Set whether placeholder leaves should be displayed.

throttleMouseMoves : Time -> Setting

Turn on mouse move throttling over a specified interval. You must connect subscriptions for this to work.