<commit_before>var Canvas = require('./canvas/canvas.js');
var ExampleJSON = require('../test/resources/importCanvas.json');
var Input = require('./helpers/input.js');
//var view = require('../server/models/view.js');

function Initialize (htmlCanvas) {
    var example;

    var c = new Canvas();
    console.log('initializing');
    c.initialize(htmlCanvas, 'myNewMindMap');

    console.log('binding');
    Input.Bind(htmlCanvas, c, function (err, res) {
        console.log(err); console.log(res); //For current debugging
    });

    console.log('importing');
    c.import(ExampleJSON, function(err, res) { 
        if(err) { console.log(err); return; }
        console.log(res);
        c.run();
    });


    /*ParseJSON.loadJSON('localhost', 'examples/importCanvas.json', function(err, res) {
        if(err) { console.log(err); return; }
        c.import(res, function(err, res) { 
            if(err) { console.log(err); return; }
            c.run();
        });
    });*/

};

Initialize(document.getElementById('mindmapCanvas'));<commit_msg>fixed exports<commit_after>var Canvas = require('./canvas/canvas.js');
var ExampleJSON = require('../test/resources/importCanvas.json');
var Input = require('./helpers/input.js');
//var view = require('../server/models/view.js');

function Initialize (htmlCanvas) {
    var example;

    var c = new Canvas();
    console.log('initializing');
    c.initialize(htmlCanvas, 'myNewMindMap');

    console.log('binding - not yet implemented');
    /*Input.Bind(htmlCanvas, c, function (err, res) {
        console.log(err); console.log(res); //For current debugging
    });*/

    console.log('importing');
    c.import(ExampleJSON, function(err, res) { 
        if(err) { console.log(err); return; }
        console.log(res);
        c.run();
    });


    /*ParseJSON.loadJSON('localhost', 'examples/importCanvas.json', function(err, res) {
        if(err) { console.log(err); return; }
        c.import(res, function(err, res) { 
            if(err) { console.log(err); return; }
            c.run();
        });
    });*/

};

Initialize(document.getElementById('mindmapCanvas'));
{'fraction_non_alphanumeric': 0.18322399250234303, 'fraction_numerical': 0.0, 'mean_word_length': 3.0056285178236397, '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': '6145798', 'n_tokens_mistral': 664, 'n_tokens_neox': 647, 'n_words': 121}