<commit_before>$(EventManager).bind("item-selection-added", function (event, data) {
    console.log("Selection was added to selection list with color " + selections.getColor(data.selection) + ' and ' + data.selection.items.length + ' items.');

    data.selection.mapToSubsets(subSets);

    plotSelectionTabs("#selection-tabs", selections, data.selection);
    plotSelectedItems("#item-table", data.selection);
});

$(EventManager).bind("item-selection-updated", function (event, data) {
    console.log('Selection was updated! New length is ' + data.selection.items.length + ' items.');

    data.selection.mapToSubsets(subSets);
    plot();

    plotSelectionTabs("#selection-tabs", selections, data.selection);
    plotSelectedItems("#item-table", data.selection);
});

$(EventManager).bind("item-selection-removed", function (event, data) {
    console.log("Selection was removed from selection list.");

    data.selection.unmapFromSubsets(subSets);

    plot();
    plotSelectionTabs("#selection-tabs", selections, selections.getActive());
    plotSelectedItems("#item-table", selections.getActive());
});

$(EventManager).bind("item-selection-activated", function (event, data) {
    if (data.selection) {
        console.log('Selection ' + data.selection.id + ' was activated.');

        plot();
        plotSelectionTabs("#selection-tabs", selections, data.selection);
        plotSelectedItems("#item-table", data.selection);
    }
    else {
        plot();
        plotSelectionTabs("#selection-tabs", selections, data.selection);
        plotSelectedItems("#item-table", data.selection);
    }
});<commit_msg>Re-draw the set overview when picking up a selection<commit_after>$(EventManager).bind("item-selection-added", function (event, data) {
    console.log("Selection was added to selection list with color " + selections.getColor(data.selection) + ' and ' + data.selection.items.length + ' items.');

    data.selection.mapToSubsets(subSets);

    plotSelectionTabs("#selection-tabs", selections, data.selection);
    plotSelectedItems("#item-table", data.selection);
});

$(EventManager).bind("item-selection-updated", function (event, data) {
    console.log('Selection was updated! New length is ' + data.selection.items.length + ' items.');

    data.selection.mapToSubsets(subSets);
    plot();

    plotSelectionTabs("#selection-tabs", selections, data.selection);
    plotSelectedItems("#item-table", data.selection);
});

$(EventManager).bind("item-selection-removed", function (event, data) {
    console.log("Selection was removed from selection list.");

    data.selection.unmapFromSubsets(subSets);

    plot();
    plotSelectionTabs("#selection-tabs", selections, selections.getActive());
    plotSelectedItems("#item-table", selections.getActive());
});

$(EventManager).bind("item-selection-activated", function (event, data) {
    if (data.selection) {
        console.log('Selection ' + data.selection.id + ' was activated.');

        plot();
        plotSelectionTabs("#selection-tabs", selections, data.selection);
        plotSelectedItems("#item-table", data.selection);
        plotSetOverview();
    }
    else {
        plot();
        plotSelectionTabs("#selection-tabs", selections, data.selection);
        plotSelectedItems("#item-table", data.selection);
    }
});
{'fraction_non_alphanumeric': 0.1586248492159228, 'fraction_numerical': 0.0, 'mean_word_length': 4.3072, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5114814', 'n_tokens_mistral': 914, 'n_tokens_neox': 888, 'n_words': 171}