<commit_before>window.Print = function(options) {

var map = options.map;
var tiles = options.tiles;
var mtime = (+new Date).toString(36);
var limit = 20000;
var sm = new SphericalMercator();

var Printer = Backbone.View.extend({});
var Modal = new views.Modal({
  el: $('.modal-content'),
  templates: templates
});

Printer.boundingBox;

var Style = options.style;
var Source = options.source;

Printer.prototype.events = {
  'click .js-recache': 'recache',
  'click .js-info': 'toggleInfo',
  'click .reselect': 'bboxReselect',
  'click .recenter': 'bboxRecenter',
  'click .js-zoomedto': 'toggleStats',
  'change #resolution': 'calculateTotal',
  'change #format': 'updateformat',
  'change .js-dimensions': 'modifydimensions',
  'change .js-coordinates': 'modifycoordinates',
  'change #lock': 'lockdimensions'
};

Printer.prototype.toggleInfo = function(ev) {
  var $el = $(ev.currentTarget);
  if ($el.is('.fill-darken2')) {
    $el.removeClass('fill-darken2 dark').addClass('quiet');
    $($el.attr('href')).addClass('hidden');
  } else {
    $el.addClass('fill-darken2 dark').removeClass('quiet');
    $($el.attr('href')).removeClass('hidden');
  }
  return false;
};

Printer.prototype.recache = function(ev) {
  this.model.set({_recache:true});
  this.save(ev);
  return false;
};

Printer.prototype.bboxEnable = function(ev) {
  if (!this.boundingBox._enabled) {

    // if coordinates are saved in the model, use those.
    // otherwise, start over.
    if (window.exporter.model && window.exporter.model.get('coordinates')){
      var locked = $('input[id=lock]:checked')[0] ? true : false;
      if (locked) this.lockdimensions();
    } else {
      this.calculateBounds();<commit_msg>fix lock error<commit_after>window.Print = function(options) {

var map = options.map;
var tiles = options.tiles;
var mtime = (+new Date).toString(36);
var limit = 20000;
var sm = new SphericalMercator();

var Printer = Backbone.View.extend({});
var Modal = new views.Modal({
  el: $('.modal-content'),
  templates: templates
});

Printer.boundingBox;

var Style = options.style;
var Source = options.source;

Printer.prototype.events = {
  'click .js-recache': 'recache',
  'click .js-info': 'toggleInfo',
  'click .reselect': 'bboxReselect',
  'click .recenter': 'bboxRecenter',
  'click .js-zoomedto': 'toggleStats',
  'change #resolution': 'calculateTotal',
  'change #format': 'updateformat',
  'change .js-dimensions': 'modifydimensions',
  'change .js-coordinates': 'modifycoordinates',
  'change #lock': 'lockdimensions'
};

Printer.prototype.toggleInfo = function(ev) {
  var $el = $(ev.currentTarget);
  if ($el.is('.fill-darken2')) {
    $el.removeClass('fill-darken2 dark').addClass('quiet');
    $($el.attr('href')).addClass('hidden');
  } else {
    $el.addClass('fill-darken2 dark').removeClass('quiet');
    $($el.attr('href')).removeClass('hidden');
  }
  return false;
};

Printer.prototype.recache = function(ev) {
  this.model.set({_recache:true});
  this.save(ev);
  return false;
};

Printer.prototype.bboxEnable = function(ev) {
  if (!this.boundingBox._enabled) {
    // if coordinates are saved in the model, use those.
    // otherwise, start over.
    if (window.exporter.model && window.exporter.model.get('coordinates')){
      window.exporter.boundingBox.enable();
      var locked = $('input[id=lock]:checked')[0] ? true : false;
      if (locked) this.lockdimensions();
    } else {
      this.calculateBounds();
      window.exporter.boundingBox.enable();
{'fraction_non_alphanumeric': 0.18061926605504589, 'fraction_numerical': 0.006307339449541285, 'mean_word_length': 4.270392749244713, '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': '1295281', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1174, 'n_words': 241}