Function computePastePlan

  • Where pasted cells go, like Excel: from the anchor, once – or tiled over a selected range that is an integer multiple of the matrix, a single value into every cell of the selected range; cut off at the last column (and at the last row unless rows may be added); cells that are not writable are skipped. DOM-free.

    Type Parameters

    • V

    Parameters

    Returns PastePlanIf<V>

    the cells to write

    Example

    const plan = computePastePlan({ matrix: [["x"]], anchorRow: 1, anchorColumn: 2, shownColumns: [0, 1, 2, 3],
    rowCount: 10, selection: { rows: 3, columns: 1 } });
    plan.cells.length; // 3 – rows 1…3 of column 2

    Since

    1.1.99