Example - Spreadsheet Drag-Fill
Demonstrates:
- Select a range of cells with a mouse
- Drag from the handle at the bottom right of the selected range to fill the dragged-over area with the values
from the selected range
- Drag-fill can be done in any direction
- Drag-fill selection border (css) is different to regular selection (uses
copyToSelectionCss
from CellRangeDecorator rather than the usual selectionCss)
- Customize drag-fill code logic to copy dragged cells by subscribing to
onDragReplaceCells.
Use this event to customise behaviour. The default function is ideal as a starting example.
- Also uses hybrid selection model plugin to select a row if the left hand cell (containing row index) is
selected, or select a cell otherwise.
- Uses the context menu plugin to display different context menus for the left hand and all other columns.
View Source: