OptionalchildrenThe layer's content — VirtualDivs, RangeRects, floats — hosted inside the layer's
boundary div. Children stack by DOM order within the layer (law 1).
OptionalclassClass for the layer's boundary div (devtools identification).
OptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonOptionalonThe sheet this pane renders — ranges belonging to a different sheet are filtered out of this pane.
OptionalsheetThe sheet view — enables the formula-view fallback: while isShowFormulas() and no
reference-mode state is on the bus, the selection anchor's formula (when it IS a formula)
has its references outlined read-only (same palette as the anchor's colored formula text —
see useFormulaViewAnchor). Omit for a host with no formula view.
OptionalstyleStyle for the layer's boundary div — e.g. display: 'none' or opacity to hide or fade a layer.
The boundary's own placement (position, inset, pointer-events: none) comes from the grid;
overriding it here breaks the layer's containment.
OptionalzExplicit stacking override, read by normalizeLayers off the grid-child element to sort the
layer list (higher sorts later = on top; omitted ⇒ declaration order). It is honored ONLY at the
grid-children level — the layer's actual dispatch slot always comes from the resulting order
index (via LayerOrderContext), never from this raw number, so paint order and event
order can never disagree.
Draws the current reference selection over the grid (Excel-style colored rectangles), highlighting the active reference. A pane layer (mounted per pane by
SheetElement), it reads the app-wide reference-mode bus (useReferenceMode) — not any edit session — so it renders whenever a reference selection is present, regardless of what produced it: a formula edit (viaSheetCellInput) or, later, a selected chart showing its source data with no active input at all.Remarks
The bus's
IRangeSelectioncan hold a multi-sheet set of ranges (a formula's references, each with its ownRangeCoords.scope) — e.g. editing=B1+Sheet2!C1on Sheet1:B1andSheet2!C1are both ranges in the ONE shared selection, but onlyB1belongs on Sheet1's pane. The MODEL handed toRangesPickerLayeris the shared selection unfiltered (a plainSheetSelection, same one every pane uses) — each pane instead filters what it draws viagetRangeStyle, returningnullfor a range whose scope isn't this pane'ssheet. This is a per-instance render filter, not a data split (seeRangesPickerLayer.getRangeStyle's doc): writes still land at the range's real, unfiltered index with no remapping, and every committed write is stamped with the committing pane's sheet byscopeDrawnRanges(always-scoped reporting — the consumer localizes;commitRange's{...range, ...box}spread preserves an existing range'sscopemid-gesture either way).