<commit_before>// Thanks to ...
// https://github.com/tamarasaurus/focalpoint

var focalPoint = function (element, options) {
  var focalpoint = this;
  this.$element = $(element);
  this.options = $.extend({
    point: $('.focus-point', this.$element)
  }, options);


  // Click on container
  $(this.$element).on('click', $('img', this.$element), function (e) {
    var pos = focalpoint.calculate($(focalpoint.$element).offset().top, $(focalpoint.$element).offset().left, e.clientY, e.clientX);
    //Calculate and position focal point
    $(options.point).offset({
      top: pos.pos_y,
      left: pos.pos_x
    });<commit_msg>fixes #9 - positioning focus point on save<commit_after>// Thanks to ...
// https://github.com/tamarasaurus/focalpoint

var focalPoint = function (element, options) {
  var focalpoint = this;
  this.$element = $(element);
  this.options = $.extend({
    point: $('.focus-point', this.$element)
  }, options);


  // Click on container
  $(this.$element).on('click', $('img', this.$element), function (e) {
    // Calculate focal point
    var pos = focalpoint.calculate($(focalpoint.$element).offset().top, $(focalpoint.$element).offset().left, e.clientY, e.clientX);
    
    // Relative positioning
    $(options.point).css({
      'left': pos.x * 100 + '%',
      'top': pos.y * 100 + '%'
    });
{'fraction_non_alphanumeric': 0.19383921863260706, 'fraction_numerical': 0.005259203606311044, 'mean_word_length': 3.296774193548387, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3198702', 'n_tokens_mistral': 441, 'n_tokens_neox': 413, 'n_words': 96}