<commit_before>/* -*- mode: espresso; espresso-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set softtabstop=2 shiftwidth=2 tabstop=2 expandtab: */

(function(CATMAID) {

  /**
   * Create a container to which one can push messages and coordinates. Both are
   * displayed separately from each other.
   */
  CATMAID.Console = function() {
    var view = document.createElement("div");
    view.className = "console";

    var coords = document.createElement("div");
    coords.id = "coordinates";
    coords.appendChild(document.createTextNode(""));
    view.appendChild(coords);
    view.appendChild(document.createElement("pre"));

    this.printCoords = function (obj) {
      coords.replaceChild(document.createTextNode(obj), coords.firstChild);
    };
<commit_msg>Console: don't create new nodes for every coordinate update<commit_after>/* -*- mode: espresso; espresso-indent-level: 2; indent-tabs-mode: nil -*- */
/* vim: set softtabstop=2 shiftwidth=2 tabstop=2 expandtab: */

(function(CATMAID) {

  /**
   * Create a container to which one can push messages and coordinates. Both are
   * displayed separately from each other.
   */
  CATMAID.Console = function() {
    var view = document.createElement("div");
    view.className = "console";

    var coords = document.createElement("div");
    coords.id = "coordinates";
    var coordsText = document.createTextNode("");
    coords.appendChild(coordsText);
    view.appendChild(coords);
    view.appendChild(document.createElement("pre"));

    this.printCoords = function (obj) {
      coordsText.textContent = obj;
    };

{'fraction_non_alphanumeric': 0.13793103448275862, 'fraction_numerical': 0.005015673981191223, 'mean_word_length': 3.75, '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': '1458899', 'n_tokens_mistral': 479, 'n_tokens_neox': 466, 'n_words': 115}