<commit_before>/**
 * A simple wrapper for sigma that hides it and all of the graph data.
 */
function GraphManager() {
	var displayGraphInstance;
	var managerInstance;
	var largestNodeId;
	var nodeClickManager;
	var realGraphInstance;

	/**
	 * @param dataLocation {string} the loaction of the graph data
	 * @param placementId {string} the id for where the graph goes
	 * @param postSetupFunction {function} called after the graph is setup
	 */
	this.load = function (dataLocation, placementId, postSetupFunction) {
		console.log(sigma.classes);
		managerInstance = new sigma({
			container: placementId,
			settings: {
				defaultNodeColor: '#ec5148',
				labelThreshold: 3,
				defaultLabelColor: '#ffffff',
			}
		});

		displayGraphInstance = managerInstance.graph;
		sigma.parsers.json(dataLocation, {
		}, function(s) {
		  	realGraphInstance = s.graph;
		  	var node = realGraphInstance.nodes('n0');
		  	displayGraphInstance.addNode(node); // loads the starting node into the graph
		  	managerInstance.refresh();

		  	nodeClickManager = new NodeClickManager(realGraphInstance, displayGraphInstance, managerInstance);

		  	nodeClickManager.startClickListener();

		  	managerInstance.timedForceAtlas2(2000);
		  	
		  	postSetupFunction();
		});
	}

	this.getNodeClickManager = function() {
		return nodeClickManager;
	}
}

/**
 * Where all of the methods added to the graph and sigma go
 */
(function() {
<commit_msg>Made the graph not go to the edges of the screen<commit_after>/**
 * A simple wrapper for sigma that hides it and all of the graph data.
 */
function GraphManager() {
	var displayGraphInstance;
	var managerInstance;
	var largestNodeId;
	var nodeClickManager;
	var realGraphInstance;

	/**
	 * @param dataLocation {string} the loaction of the graph data
	 * @param placementId {string} the id for where the graph goes
	 * @param postSetupFunction {function} called after the graph is setup
	 */
	this.load = function (dataLocation, placementId, postSetupFunction) {
		console.log(sigma.classes);
		managerInstance = new sigma({
			container: placementId,
			settings: {
				defaultNodeColor: '#ec5148',
				labelThreshold: 3,
				defaultLabelColor: '#ffffff',
				sideMargin: 5,
			}
		});

		displayGraphInstance = managerInstance.graph;
		sigma.parsers.json(dataLocation, {
		}, function(s) {
		  	realGraphInstance = s.graph;
		  	var node = realGraphInstance.nodes('n0');
		  	displayGraphInstance.addNode(node); // loads the starting node into the graph
		  	managerInstance.refresh();

		  	nodeClickManager = new NodeClickManager(realGraphInstance, displayGraphInstance, managerInstance);

		  	nodeClickManager.startClickListener();

		  	managerInstance.timedForceAtlas2(2000);
		  	
		  	postSetupFunction();
		});
	}

	this.getNodeClickManager = function() {
		return nodeClickManager;
	}
}

/**
 * Where all of the methods added to the graph and sigma go
 */
(function() {

{'fraction_non_alphanumeric': 0.09814687714481812, 'fraction_numerical': 0.007892930679478381, 'mean_word_length': 4.017211703958692, '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': '1537125', 'n_tokens_mistral': 949, 'n_tokens_neox': 822, 'n_words': 244}