3 $.extend(true, window, {
5 "CellRangeDecorator": CellRangeDecorator
10 * Displays an overlay on top of a given cell range.
13 * Currently, it blocks mouse events to DOM nodes behind it.
14 * Use FF and WebKit-specific "pointer-events" CSS style, or some kind of event forwarding.
15 * Could also construct the borders separately using 4 individual DIVs.
18 * @param {Object} options
20 function CellRangeDecorator(grid, options) {
25 "border": "2px dashed red"
29 options = $.extend(true, {}, _defaults, options);
32 function show(range) {
34 _elem = $("<div></div>", {css: options.selectionCss})
35 .css("position", "absolute")
36 .appendTo(grid.getCanvasNode());
39 var from = grid.getCellNodeBox(range.fromRow, range.fromCell);
40 var to = grid.getCellNodeBox(range.toRow, range.toCell);
45 height: to.bottom - from.top - 2,
46 width: to.right - from.left - 2