<commit_before>"use strict";

/*global module, require*/

var dialogueFactory = require("../floating-dialogue/floating-dialogue.js"),
    drawResultsTablesFactory = require("./draw-results-tables.js");


module.exports = function(container, getShapeLayers, update) {
    var resultsTables = dialogueFactory(
	"results",
	{
	    reposition: true,
	    close: true,
	    resize: true,
	    sticky: true,
	    bringToFront: true,
	    findSpace: true,
	    lockToScreen: true
	}
    ),

	drawResultsTables = drawResultsTablesFactory(getShapeLayers, update),
	
	drawing = resultsTables.drawing(
	    function(id) {
		return getShapeLayers().get(id).resultsTable;
	    },
	    container,
	    drawResultsTables.drawDialogues,
	    function(buttons, newButtons) {
		newButtons.text("⊞");
	    },
	    function(layerName) {
		return getShapeLayers().get(layerName).resultsTable;
	    }
	);

    return {
	createData: resultsTables.createData,
	deserialize: resultsTables.deserialize,
	updateDialogues: function(orderedShapeLayers) {
	    drawing.dialogues(<commit_msg>Don't show table by default when you add a layer.<commit_after>"use strict";

/*global module, require*/

var dialogueFactory = require("../floating-dialogue/floating-dialogue.js"),
    drawResultsTablesFactory = require("./draw-results-tables.js");


module.exports = function(container, getShapeLayers, update) {
    var resultsTables = dialogueFactory(
	"results",
	{
	    reposition: true,
	    close: true,
	    resize: true,
	    sticky: true,
	    bringToFront: true,
	    findSpace: true,
	    lockToScreen: true,
	    initialVisibility: false
	}
    ),

	drawResultsTables = drawResultsTablesFactory(getShapeLayers, update),
	
	drawing = resultsTables.drawing(
	    function(id) {
		return getShapeLayers().get(id).resultsTable;
	    },
	    container,
	    drawResultsTables.drawDialogues,
	    function(buttons, newButtons) {
		newButtons.text("⊞");
	    },
	    function(layerName) {
		return getShapeLayers().get(layerName).resultsTable;
	    }
	);

    return {
	createData: resultsTables.createData,
	deserialize: resultsTables.deserialize,
	updateDialogues: function(orderedShapeLayers) {
	    drawing.dialogues(
{'fraction_non_alphanumeric': 0.11694837825491092, 'fraction_numerical': 0.0, 'mean_word_length': 3.8237885462555066, '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': '802705', 'n_tokens_mistral': 716, 'n_tokens_neox': 658, 'n_words': 122}