This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0
Align and Distribute libraries for forms
version 1.0.0
license BSD3
native-modules False
elm-version 0.15.0 <= v < 0.16.0
Tag 1.0.1
Committed At 2015-04-18 15:30:33 UTC
elm-lang/core 2.0.0 <= v < 3.0.0 2.1.0

Modules

README

Align and Distribute for Elm

A pair of libraries for arranging forms in Elm, by Max Goldstein.

Demonstration Animation

The code for the above gif (more or less) is available in the examples directory.

Starting in 1.0.1, the Elm 0.15 release, it is always safe to pass an empty list to any function (the empty list will be returned).

Submit bugs, requests, and the like through GitHub.

Align

Aligns all forms to the edge or centerline of the bounding box of the centers of the forms. In all cases, only one of the x and y coordinates is changed.

Align.top         : List Form -> List Form
Align.bottom      : List Form -> List Form
Align.left        : List Form -> List Form
Align.right       : List Form -> List Form
Align.horizontal  : List Form -> List Form
Align.vertical    : List Form -> List Form

Distribute

Distribute forms with even distances from center-to-center within their bounding box. Distributing horizontally changes only the x coordinate, and distributing vertically changes only the y coordinate.

Distribute.horizontal : List Form -> List Form
Dsitribute.vertical   : List Form -> List Form

Distribute forms with even distances from center-to-center along the given length, centered.

Distribute.horizAlong : Float -> List Form -> List Form
Dsitribute.vertAlong  : Float -> List Form -> List Form

Distribute forms with even angular spacing around a centerpoint at a given radius. Forms are kept in the order provided, with the first form being directly left of the centerpoint and others going counterclockwise. Optionally, rotate the forms by an amount proportional to their angle (see the clockface example).

Distribute.angular    : (Float, Float) -> Float -> List Form -> List Form
Distribute.angularRot : (Float, Float) -> Float -> List Form -> List Form