MAIDR JavaScript API
    Preparing search index...

    What the visual rotor dial draws: the modes around its ring, the current one, and how far the ring has turned.

    interface RotorDialState {
        labels: string[];
        index: number;
        turn: number;
        direction: -1 | 1;
        revision: number;
    }
    Index

    Properties

    labels: string[]

    Mode names, in cycle order, around the ring.

    index: number

    Index of the current mode in labels.

    turn: number

    Steps the ring has turned in total, +1 per forward and -1 per backward cycle. Always congruent to index modulo the number of labels, but not wrapped, so the ring keeps turning the way the reader turned it instead of spinning back the long way when the cycle wraps.

    direction: -1 | 1

    Which way the last cycle turned the ring: +1 forward, -1 backward.

    revision: number

    Bumped on every cycle, so the dial reappears even on the same mode.