<commit_before>var step_point = 10;
var current_svg_xml = "";
var current_svg_width = 0;
var current_svg_height = 0;

$(function() {
    document.getElementById('dropzone').addEventListener('drop', manageDropFromTitle, false);

    $("#step_point").val(step_point.toString());
    $('#btn-apply').click(function() {
        HoldOn.open({message:"Applying new step points length to SVG"});
        step_point = parseInt($("#step_point").val());
        if (step_point <= 0) step_point = 1;
        setTimeout(generatePointsFromSvg, 500);
    });

    paper = Raphael(document.getElementById("canvas"), '100%', '100%');
    current_displayed_paths = null;

    var previousFile = null;

     $('#dropzone').dropzone({ 
        url: "/upload",
        maxFilesize: 5,
        maxThumbnailFilesize: 1,
        autoProcessQueue: false,
        //acceptedFiles: '.svg',
        init: function() {
            myDropzone = this;

            this.on('addedfile', function(file) {
                if (file.type != "image/svg+xml") {
                    $.notify("Invalid format, only SVG is supported", "error");
                    this.removeFile(file);
                    return;<commit_msg>Avoid generating points when applying settings when there is no svg imported<commit_after>var step_point = 10;
var current_svg_xml = "";
var current_svg_width = 0;
var current_svg_height = 0;

$(function() {
    document.getElementById('dropzone').addEventListener('drop', manageDropFromTitle, false);

    $("#step_point").val(step_point.toString());
    $('#btn-apply').click(function() {
        step_point = parseInt($("#step_point").val());

        if (current_svg_xml == "")
            return;
            
        HoldOn.open({message:"Applying new step points length to SVG"});
        if (step_point <= 0) step_point = 1;
        setTimeout(generatePointsFromSvg, 500);
    });

    paper = Raphael(document.getElementById("canvas"), '100%', '100%');
    current_displayed_paths = null;

    var previousFile = null;

     $('#dropzone').dropzone({ 
        url: "/upload",
        maxFilesize: 5,
        maxThumbnailFilesize: 1,
        autoProcessQueue: false,
        //acceptedFiles: '.svg',
        init: function() {
            myDropzone = this;

            this.on('addedfile', function(file) {
                if (file.type != "image/svg+xml") {
                    $.notify("Invalid format, only SVG is supported", "error");
                    this.removeFile(file);
                    return;
{'fraction_non_alphanumeric': 0.14565043894652832, 'fraction_numerical': 0.013567438148443736, 'mean_word_length': 2.545968882602546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, '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': '4581340', 'n_tokens_mistral': 746, 'n_tokens_neox': 699, 'n_words': 155}