Malli schema for the metadata Plotje stamps onto the vector
returned by plan->membrane (and so by pj/membrane).
The vector itself is a Membrane drawable tree -- a sequence of
things satisfying membrane.ui/IOrigin. That structural contract
belongs to Membrane (see membrane.ui protocols) and is not
modeled here. This schema is strictly Plotje's own contract: the
keys we attach as metadata so that membrane->plot defmethods
(and any third-party backend) can read plan-derived dimensions
and title without re-walking the tree.
Malli schema for the metadata Plotje stamps onto the vector returned by `plan->membrane` (and so by `pj/membrane`). The vector itself is a Membrane drawable tree -- a sequence of things satisfying `membrane.ui/IOrigin`. That structural contract belongs to Membrane (see `membrane.ui` protocols) and is not modeled here. This schema is strictly Plotje's own contract: the keys we attach as metadata so that `membrane->plot` defmethods (and any third-party backend) can read plan-derived dimensions and title without re-walking the tree.
(explain-meta x)Explain why x does not conform to MembraneMeta. Returns nil
if valid, or a Malli explanation map if invalid.
Explain why x does not conform to `MembraneMeta`. Returns nil if valid, or a Malli explanation map if invalid.
Plotje's metadata contract on the vector returned by
plan->membrane.
:total-width -- canvas width in drawing units (positive integer).:total-height -- canvas height in drawing units (positive integer).:title -- plot title, or nil if unset.Backend authors writing their own membrane->plot defmethod
should read these from (meta membrane-tree) to size the canvas
and label it. Backends that produce membrane vectors directly
(without going through pj/plan->membrane) should attach metadata
conforming to this schema.
Plotje's metadata contract on the vector returned by `plan->membrane`. - `:total-width` -- canvas width in drawing units (positive integer). - `:total-height` -- canvas height in drawing units (positive integer). - `:title` -- plot title, or nil if unset. Backend authors writing their own `membrane->plot` defmethod should read these from `(meta membrane-tree)` to size the canvas and label it. Backends that produce membrane vectors directly (without going through `pj/plan->membrane`) should attach metadata conforming to this schema.
(valid-meta? x)True if x conforms to MembraneMeta.
True if x conforms to `MembraneMeta`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |