valueAtPosition

Returns what a position reads as: the name at that index for a categorical parameter, the position itself for every other.

@internote/canvas-sdkFunction
On this page
import { valueAtPosition } from '@internote/canvas-sdk';

The one place positions and values meet. The sweep arithmetic works on positions; everything that consumes a parameter reads values.

#Signature

(parameter: Parameter, position: number): ParameterValue

#Parameters

parameter
A parameter from ctx.parameters.all.
position
A position on its range, such as one ctx.parameters.state() holds.

Declared in packages/canvas-sdk/src/parameters/index.ts:481.

Last updated