Module

Hylograph.Flow.Render.Present

Package
purescript-hylograph-flow-render
Repository
afcondon/purescript-hylograph-flow-render

Present mode: nothing hidden, the folded parts drawn quiet (0.6).

An alternative to folding. The picture is the layout with every group open, whatever the cut; the groups the cut closes are quiet: their nodes are still there, at their breadths, with their ribbons, and are made to take less of the eye.

THE RULE IN A SANKEY: BREADTH IS DATA AND IS NEVER REDUCED. A quiet node may lose length along the flow, its colour, and its words; it may not get narrower, and neither may a ribbon. So de-emphasis is two things and no others: present shortens a quiet node along the flow (about its middle, its ribbons following its sides), and quietly marks quiet nodes and the ribbons between two of them with the class flow-quiet, for a stylesheet to mute. Every node is as broad across the flow, and every ribbon as broad, as in the layout it was given.

What it does not do: draw the tiers of a quiet group nearer together. That would move everything downstream of it, which the layout engine would have to be told of; here only the nodes are shortened.

#quietKeys Source

quietKeys :: forall wire. Set GroupId -> Layout wire -> Set ElementKey

The nodes of a layout that are in a quiet group: the members of those groups' outlines. (The layout must have been made with the picture told of its groups, and with them open.)

#present Source

present :: forall wire. Number -> Set GroupId -> Layout wire -> Layout wire

A layout with the nodes of the quiet groups shortened along the flow to a share of what they were (length, from 0 to 1), about their middles; nothing is made narrower.

#quietly Source

quietly :: forall wire. Set ElementKey -> Decoration wire -> Decoration wire

A decoration with flow-quiet added to the class of every quiet node and of every edge between two quiet nodes.

#quietClass Source

quietClass :: String

The class a quiet mark is given.