<commit_before>/**
 * Created by <NAME> on 15.12.2014.
 */
import C = require('../caleydo_core/main');
import template = require('../caleydo_clue/template');
import cmode = require('../caleydo_clue/mode');
import gapminder = require('./gapminder');

//scoping let --> function level scope in js vs java global, local
let helper = document.querySelector('div.gapminder');

const elems = template.create(document.body, {
  app: 'GapMinder',
  application: '/gapminder',
  id: 'clue_gapminder',
  recordSelectionTypes: 'selected,filtered',
  animatedSelections: true,
  thumbnails: false
});

{
  while(helper.firstChild) {
    (<Node>elems.$main.node()).appendChild(helper.firstChild);
  }
}

elems.graph.then((graph) => {
  const app = gapminder.create(<Element>elems.$main.node(), graph);

  app.on('wait', elems.header.wait.bind(elems.header));
  app.on('ready', elems.header.ready.bind(elems.header));

  function updateBounds() {
    var bounds = C.bounds(document.querySelector('main'));
    app.setBounds(bounds.x, bounds.y, bounds.w - 200, bounds.h - 80);
  }

  //d3.select(elems.header.options).append('label').html(`<input type="checkbox">Show Trails`).select('input').on('change', function () {
  //    app.showTrails(this.checked);
  //  });

  elems.on('modeChanged', function (event, new_) {
    app.setInteractive(new_.exploration >= 0.8);
    //for the animations to end
    setTimeout(updateBounds, 300);
  });

  $(window).on('resize', updateBounds);
  setTimeout(updateBounds, 500);

  app.setInteractive(cmode.getMode().exploration >= 0.8);

  elems.jumpToStored();
});
<commit_msg>Import CLUE styles separately  for each application and not in the template.ts<commit_after>/**
 * Created by <NAME>l on 15.12.2014.
 */

// Determine the order of css files manually

// HACK! because <amd-dependency path="bootstrap" /> is loaded after all the other stylesheets and not before (as declared)
/// <amd-dependency path="css!/bower_components/bootstrap/dist/css/bootstrap" />

/// <amd-dependency path="font-awesome" />
/// <amd-dependency path="css!../caleydo_bootstrap_fontawesome/style.css" />
/// <amd-dependency path="css!./style.css"/>


import C = require('../caleydo_core/main');
import template = require('../caleydo_clue/template');
import cmode = require('../caleydo_clue/mode');
import gapminder = require('./gapminder');

//scoping let --> function level scope in js vs java global, local
let helper = document.querySelector('div.gapminder');

const elems = template.create(document.body, {
  app: 'GapMinder',
  application: '/gapminder',
  id: 'clue_gapminder',
  recordSelectionTypes: 'selected,filtered',
  animatedSelections: true,
  thumbnails: false
});

{
  while(helper.firstChild) {
    (<Node>elems.$main.node()).appendChild(helper.firstChild);
  }
}

elems.graph.then((graph) => {
  const app = gapminder.create(<Element>elems.$main.node(), graph);

  app.on('wait', elems.header.wait.bind(elems.header));
  app.on('ready', elems.header.ready.bind(elems.header));

  function updateBounds() {
    var bounds = C.bounds(document.querySelector('main'));
    app.setBounds(bounds.x, bounds.y, bounds.w - 200, bounds.h - 80);
  }

  //d3.select(elems.header.options).append('label').html(`<input type="checkbox">Show Trails`).select('input').on('change', function () {
  //    app.showTrails(this.checked);
  //  });

  elems.on('modeChanged', function (event, new_) {
    app.setInteractive(new_.exploration >= 0.8);
    //for the animations to end
    setTimeout(updateBounds, 300);
  });

  $(window).on('resize', updateBounds);
  setTimeout(updateBounds, 500);

  app.setInteractive(cmode.getMode().exploration >= 0.8);

  elems.jumpToStored();
});

{'fraction_non_alphanumeric': 0.18004338394793926, 'fraction_numerical': 0.013015184381778741, 'mean_word_length': 4.33092485549133, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 24, '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': '3323662', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1206, 'n_words': 230}