<commit_before>/** 
 * Selection Handles Plugin
 *
 * Depends upon options.selection.mode
 *
 * Options
 *  show - True enables the handles plugin.
 *  drag - Left and Right drag handles
 *  scroll - Scrolling handle
 */
(function () {

var D = Flotr.DOM,
  E = Flotr.EventAdapter,
  o, s, el, container, left, right, scroll, delta, X,
  moveHandler;

Flotr.addPlugin('handles', {

  options: {
    show: false,
    drag: true,
    scroll: true
  },

  callbacks: {
    'flotr:afterinit': init,
    'flotr:select': handleSelect,
    'flotr:click': reset,
    'flotr:mousemove': mouseMoveHandler
  }

});


function init() {

  var graph = this;

  if (!graph.options.selection.mode || !graph.options.handles.show) return;

  el = graph.el;
  o = graph.options.handles;

  container = D.node('<div class="flotr-handles"></div>');

  // Drag handles
  if (o.drag) {
    right = D.node('<div class="flotr-handles-handle flotr-handles-drag flotr-handles-right"></div>');
    left  = D.node('<div class="flotr-handles-handle flotr-handles-drag flotr-handles-left"></div>');
    D.insert(container, right);
    D.insert(container, left);

    E.observe(left, 'mousedown', function () {
      moveHandler = leftMoveHandler;
    });<commit_msg>Switched to reset handles on mousedown.<commit_after>/** 
 * Selection Handles Plugin
 *
 * Depends upon options.selection.mode
 *
 * Options
 *  show - True enables the handles plugin.
 *  drag - Left and Right drag handles
 *  scroll - Scrolling handle
 */
(function () {

var D = Flotr.DOM,
  E = Flotr.EventAdapter,
  o, s, el, container, left, right, scroll, delta, X,
  moveHandler;

Flotr.addPlugin('handles', {

  options: {
    show: false,
    drag: true,
    scroll: true
  },

  callbacks: {
    'flotr:afterinit': init,
    'flotr:select': handleSelect,
    'flotr:mousedown': reset,
    'flotr:mousemove': mouseMoveHandler
  }

});


function init() {

  var graph = this;

  if (!graph.options.selection.mode || !graph.options.handles.show) return;

  el = graph.el;
  o = graph.options.handles;

  container = D.node('<div class="flotr-handles"></div>');

  // Drag handles
  if (o.drag) {
    right = D.node('<div class="flotr-handles-handle flotr-handles-drag flotr-handles-right"></div>');
    left  = D.node('<div class="flotr-handles-handle flotr-handles-drag flotr-handles-left"></div>');
    D.insert(container, right);
    D.insert(container, left);

    E.observe(left, 'mousedown', function () {
      moveHandler = leftMoveHandler;
    });
{'fraction_non_alphanumeric': 0.15627498001598722, 'fraction_numerical': 0.0, 'mean_word_length': 3.293310463121784, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '7019160', 'n_tokens_mistral': 901, 'n_tokens_neox': 874, 'n_words': 195}