MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / initSel

Function initSel

libs/datatables-binding-0.18/datatables.js:942–952  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

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

Callers 1

datatables.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected