<commit_before>define([], function() {
    'use strict';
    
    var EasyDAGInitial = function() {
        this._empty = true;
        this._emptyMsg = 'Click to create a new node';
        this.$emptyMsg = null;
    };

    EasyDAGInitial.prototype.updateEmptyMsg = function() {
        if (this._empty) {
            this._renderEmpty();
        } else if (this.$emptyMsg) {
            this.$emptyMsg.remove();
            this.$emptyMsg = null;
        }
    };

    EasyDAGInitial.prototype._renderEmpty = function() {
        this.$emptyMsg = this._$svg.append('text')
            .attr('x', this.width/2)
            .attr('y', this.height/2)
            .attr('class', 'background-text')
            .attr('text-anchor', 'middle')  // FIXME: Move this to css
            .attr('fill', '#9e9e9e')  // FIXME: Move this to css
            .text(this._emptyMsg)
            .on('click', () => {
                d3.event.stopPropagation();
                d3.event.preventDefault();
                this.onCreateInitialNode();
            });
    };
<commit_msg>Refreshed the empty msg on screen refresh. Fixes #30<commit_after>define([], function() {
    'use strict';
    
    var EasyDAGInitial = function() {
        this._empty = true;
        this._emptyMsg = 'Click to create a new node';
        this.$emptyMsg = null;
    };

    EasyDAGInitial.prototype.updateEmptyMsg = function() {
        if (this.$emptyMsg) {
            this.$emptyMsg.remove();
            this.$emptyMsg = null;
        }

        if (this._empty) {
            this._renderEmpty();
        }
    };

    EasyDAGInitial.prototype._renderEmpty = function() {
        this.$emptyMsg = this._$svg.append('text')
            .attr('x', this.width/2)
            .attr('y', this.height/2)
            .attr('class', 'background-text')
            .attr('text-anchor', 'middle')  // FIXME: Move this to css
            .attr('fill', '#9e9e9e')  // FIXME: Move this to css
            .text(this._emptyMsg)
            .on('click', () => {
                d3.event.stopPropagation();
                d3.event.preventDefault();
                this.onCreateInitialNode();
            });
    };

{'fraction_non_alphanumeric': 0.14988505747126438, 'fraction_numerical': 0.0073563218390804595, 'mean_word_length': 1.693069306930693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6015770', 'n_tokens_mistral': 635, 'n_tokens_neox': 630, 'n_words': 123}