Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
delete spec.dataspec.file;
delete spec.dataspec.separator;
spec.dataspec.data = dataset;
spec.storage = LineUpJS.createLocalStorage(dataset, LineUpJS.deriveColors(desc.columns));
let config = ((lineupObj ? lineupObj.config : $.extend({}, this.lineUpConfig)) || {});
if (!config.renderingOptions) {
config.renderingOptions = {};
}
let oldAnimation = config.renderingOptions.animation;
config.renderingOptions.animation = false;
let columnFixed = 5;
let scale = this.createLineupAdjustWidth(elem, name, spec, columnFixed);
/* Always recreate the control */
$(elem).empty();
/* Lineup takes a d3 element */
lineupObj = LineUpJS.create(spec.storage, d3.select(elem), this.lineUpConfig);
lineupObj.restore(desc);
config = lineupObj.config;
lineupObj.header.dragHandler.on('dragend.lineupWidget', (evt) => {
this.lineupDragColumnEnd(name, evt);
});
lineupObj['column-scale'] = scale;
lineupObj['column-fixed'] = columnFixed;
lineupObj['lineup-key'] = name;
$(elem).attr('lineup-key', name);
if (sort) {
let sortColumn;
$.each(lineupObj.data.getRankings(), function (ridx, ranking) {
$.each(ranking.flatColumns, function (cidx, column) {
if (column.label === sort) {
sortColumn = column.id;
}