parameterOf
Reads one control node into a Parameter: its name, range, step, starting value and format, taking them from a bound data column or a written options: list where it has one.
@internote/canvas-sdkOn this page
import { parameterOf } from '@internote/canvas-sdk';Three ways a parameter learns what it ranges over, in precedence order:
options:— the stops written out. Aselector's own, and the only way to a parameter of names with no dataset behind it;column:— a column. The cells are the stops, their span is the range, and what they ARE decides the format. What the author wrote forrange:is not consulted: a parameter over#pop.yearthat also ranged [-10, 10] would be two claims about the same thing;range:/step:— the ladder, andformat:alone says how it reads.
Returns null for a control with no parameter name, and for one bound to a column that has not arrived: an attached dataset resolves to nothing until the host fills its rows in.
#Signature
(
node: CompiledNode,
datasets: Record<string, ChalkDataset> | undefined,
): Parameter | null#Parameters
nodeA
slider, selector, cue.slider or cue.selector node.datasetsThe document's datasets, which an
column: column is read from.Declared in packages/canvas-sdk/src/parameters/index.ts:192.