Suggestions to lower the lag for a panel on a viewport?
-
So I was able to find a way to switch out the sort functions:
// use custom sort functions for different columns inline function sortArrayByColumn(rowData, columnIndex, comparisonFunction, sortDirection) { rowData.sort(function[columnIndex, comparisonFunction](a, b) { var colA = a["col" + columnIndex]; var colB = b["col" + columnIndex]; return comparisonFunction(colA, colB); }); if (sortDirection) { return rowData; } else { rowData.reverse(); return rowData; } };
I store the sort functions in an array and pass them here as "comparisonFunction".