Visualize.Board.View (Visualize v0.8.3)

Copy Markdown View Source

What a cell shows, as its process sends it to the board's subscribers (spec/15 §8.3, D-146): {:visualize_board, board, {:cell, name, view}}.

A view is never blank. svg is the chart's frame, an accessible SVG root, or nil where no chart is drawn; note is the state's own drawing (Visualize.Board.State): the whole cell when svg is nil, a banner over the chart when the state is not :live, and nil when it is. crosshair and keyboard are the attribute maps of CrosshairHook and KeyboardHook for the frame (spec/10 §13.2, §17.2), %{} where there are none; size is the cell's box and frames the chart frames its process has drawn. drawn is the token of the drawing svg is, new at each frame the process draws, which a click carries back so the cell resolves it against that drawing alone (spec/15 §9.2, D-170); nil without one, and for a snapshot's view.

Summary

Types

t()

@type t() :: %Visualize.Board.View{
  cell: atom(),
  crosshair: %{required(String.t()) => String.t()},
  drawn: String.t() | nil,
  frames: non_neg_integer(),
  keyboard: %{required(String.t()) => String.t()},
  note: String.t() | nil,
  size: {number(), number()},
  state: Visualize.Board.State.t(),
  svg: String.t() | nil,
  title: String.t() | nil
}