| 940 | var selClass = inArray(data.style, ['bootstrap', 'bootstrap4']) ? 'active' : 'selected'; |
| 941 | // selected1: row indices; selected2: column indices |
| 942 | var initSel = function(x) { |
| 943 | if (x === null || typeof x === 'boolean' || selTarget === 'cell') { |
| 944 | return {rows: [], cols: []}; |
| 945 | } else if (selTarget === 'row') { |
| 946 | return {rows: $.makeArray(x), cols: []}; |
| 947 | } else if (selTarget === 'column') { |
| 948 | return {rows: [], cols: $.makeArray(x)}; |
| 949 | } else if (selTarget === 'row+column') { |
| 950 | return {rows: $.makeArray(x.rows), cols: $.makeArray(x.cols)}; |
| 951 | } |
| 952 | } |
| 953 | var selected = data.selection.selected; |
| 954 | var selected1 = initSel(selected).rows, selected2 = initSel(selected).cols; |
| 955 | // selectable should contain either all positive or all non-positive values, not both |