Member Junction
    Preparing search index...
    • The tool the host should hold when current is no longer allowed: select when the roster offers it, else the roster's first KNOWN entry, else current unchanged.

      Why select first rather than roster[0]: roster order is documented as meaningless for rendering (VisibleToolbarEntries always uses list order), so it must not quietly become load-bearing here. select is the neutral tool; falling back to roster order instead would let a host land the user on the eraser by writing the roster in an innocuous order.

      An empty or all-typo roster returns current, so the board never has "no tool" — narrowing the palette to nothing is not the same as making the board read-only.

      Parameters

      • current:
            | "sticky"
            | "shape"
            | "text"
            | "image"
            | "connector"
            | "markdown"
            | "html"
            | "select"
            | "pan"
            | "pen"
            | "eraser"
      • roster: readonly (
            | "sticky"
            | "shape"
            | "text"
            | "image"
            | "connector"
            | "markdown"
            | "html"
            | "select"
            | "pan"
            | "pen"
            | "eraser"
        )[]

      Returns
          | "sticky"
          | "shape"
          | "text"
          | "image"
          | "connector"
          | "markdown"
          | "html"
          | "select"
          | "pan"
          | "pen"
          | "eraser"