MAIDR Documentation - v4.4.0
    Preparing search index...

    Function stampOrderedSelectors

    • Emits one selector per element, in the order given, by stamping each with a MAIDR-owned index attribute.

      For the traces whose payload order is the binder's own rather than the DOM's — a gantt nests its intervals by lane, a hexbin its bins by lattice row — a single selector matching every mark is worse than no selector at all: it resolves in DOM order, so the model pairs each announced datum with whatever mark sat at that position, and the counts still match so nothing detects it.

      The stamp is an attribute the binder owns rather than a structural :nth-child(N), which any later DOM insertion would shift, and every stamp already under the root is cleared before the new ones are laid down so rebinding after a D3 data update leaves a clean state.

      Parameters

      • container: Element

        The extraction root (the SVG, or a panel element).

      • selector: string

        The user-provided selector matching the marks.

      • attribute: string

        The data-maidr-* attribute to key the marks by.

      • ordered: Element[]

        The elements, in the payload's order.

      • Optionalpanel: D3PanelScope

        Optional panel scope for multi-panel binds.

      Returns string[]

      One selector per element, in the same order.