SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Function scopeDrawnRanges

    • Wrap a selection so a range committed through this pane is stamped with this pane's sheet.

      Parameters

      Returns SheetSelection

      Applies to the range at rangeIndex — the ONE the picker just wrote — for both of its gestures, since a gesture on this pane places the range on this sheet either way:

      • insert (append past the current length) — a brand-new reference drawn here;
      • re-scope (replace in place) — dragging the ACTIVE reference here moves it to this sheet, which is how =A1 (Sheet1's) becomes =Sheet2!A1 when you drag it while viewing Sheet2.

      Guarded on the range having actually CHANGED (identity compare against the current one), so a bare activation — setActive merely moving rangeIndex to a different reference, reusing the same range objects — never re-homes anything. That distinction is what keeps selecting a reference from silently moving it: only a geometry write re-homes, never a change of which reference is active.