MCPcopy Create free account
hub / github.com/breck7/scroll / init

Function init

external/.datatables.js:17223–17234  ·  view source on GitHub ↗

* Setup for ColReorder API operations * * @param dt DataTable(s) being operated on - might have multiple tables!

(api)

Source from the content-addressed store, hash-verified

17221 * @param dt DataTable(s) being operated on - might have multiple tables!
17222 */
17223 function init(api) {
17224 // Assign the original column index to a parameter that we can lookup.
17225 // On the first pass (i.e. when the parameter hasn't yet been set), the
17226 // index order will be the original order, so this is quite a simple
17227 // assignment.
17228 api.columns().iterator("column", function (s, idx) {
17229 var columns = s.aoColumns
17230 if (columns[idx]._crOriginalIdx === undefined) {
17231 columns[idx]._crOriginalIdx = idx
17232 }
17233 })
17234 }
17235 /**
17236 * Switch the key value pairing of an index array to be value key (i.e. the old value is now the
17237 * key). For example consider [ 2, 0, 1 ] this would be returned as [ 1, 2, 0 ].

Callers 3

_fnColumnTypesFunction · 0.70
ColReorderFunction · 0.70
.datatables.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected