Skip to main content

Function: diamond()

diamond(overrides?): EntryVariant

Defined in: layout/bars/variants.ts:326

diamond() — a marker for a zero-duration span (start === end), not a core default. Its default when reads start/end directly rather than entry.read('duration'): this runs on the hover path (I5, EntryPredicate's own "keep it cheap"), and a Field read goes through the registry and hands back a { value, unit } object, for what is a plain equality check here. Both spellings give one answer on every row. This one answers by structure, never a stored word (ADR 0013's "core does not ship a diamond" is narrowed by this factory, not spent).

Not in CORE_VARIANTS. No row wears diamond() until an author installs it — this factory's own default rule, or a consumer's own { bars: fixedWidthBar(...) }.

What you can do to it: no resize. A resize commits a real duration, and this factory's own when stops matching the moment start !== end — the row would turn into a bar under the pointer that dragged it. diamond({ can: { resize: true } }) opts back in for an author who wants that.

Parameters​

overrides?​

Partial<EntryVariant> = {}

Returns​

EntryVariant