<commit_before>events     = require "../../../client/pointer.coffee"
lighter    = require "../../../color/lighter.coffee"
print      = require "../../../core/console/print.coffee"
stylesheet = require "../../../client/css.coffee"

# Creates "back" button, if applicable
module.exports = (vars) ->

  if !vars.small and vars.history.states.length > 0

    print.time "drawing back button" if vars.dev.value

    button = vars.container.value.selectAll("div#d3plus_back_button")
      .data(["d3plus_back_button"])
      .style("position", "relative")
      .style "z-index", 1900

    size    = vars.title.sub.font.size
    color   = vars.title.sub.font.color
    family  = vars.title.sub.font.family.value
    weight  = vars.title.sub.font.weight
    padding = vars.title.sub.padding

    titleClass = false
    if vars.title.sub.value and
            ["start", "left"].indexOf(vars.title.sub.font.align) < 0
      titleClass = "sub"
    else if vars.title.total.value and
            ["start", "left"].indexOf(vars.title.total.font.align) < 0<commit_msg>fixes back button appearance according to .history() value (#544)<commit_after>events     = require "../../../client/pointer.coffee"
lighter    = require "../../../color/lighter.coffee"
print      = require "../../../core/console/print.coffee"
stylesheet = require "../../../client/css.coffee"

# Creates "back" button, if applicable
module.exports = (vars) ->

  if !vars.small and vars.history.value and vars.history.states.length > 0

    print.time "drawing back button" if vars.dev.value

    button = vars.container.value.selectAll("div#d3plus_back_button")
      .data(["d3plus_back_button"])
      .style("position", "relative")
      .style "z-index", 1900

    size    = vars.title.sub.font.size
    color   = vars.title.sub.font.color
    family  = vars.title.sub.font.family.value
    weight  = vars.title.sub.font.weight
    padding = vars.title.sub.padding

    titleClass = false
    if vars.title.sub.value and
            ["start", "left"].indexOf(vars.title.sub.font.align) < 0
      titleClass = "sub"
    else if vars.title.total.value and
            ["start", "left"].indexOf(vars.title.total.font.align) < 0
{'fraction_non_alphanumeric': 0.16384439359267736, 'fraction_numerical': 0.009610983981693364, 'mean_word_length': 2.6312292358803986, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '908673', 'n_tokens_mistral': 709, 'n_tokens_neox': 680, 'n_words': 139}