<commit_before>;(function($, window, document, undefined) {

  var DraggableGridList = function(element, options) {
    this.options = $.extend({}, this.defaults, options);
    this.$element = $(element);
    this.init();
  };

  DraggableGridList.prototype.defaults = {
    DOMDataKey: '_gridList',
    rows: 5,
    autoItemSize: false
  };

  DraggableGridList.prototype.init = function() {
    // Unbind any previous instance of DraggableGridList found on the targeted
    // element, and add a reference to the new one
    var previousInstance = this.$element.data(this.options.DOMDataKey);
    if (previousInstance instanceof DraggableGridList) {
      previousInstance._unbindDragEvents();
    }
    this.$element.data(this.options.DOMDataKey, this);

    // Read items and their meta data
    this.$items = this.$element.children('li');
    this.items = this._generateItemsFromDOM();

    // Create instance of GridList (decoupled lib for handling the grid
    // positioning and sorting post-drag and dropping)
    this.gridList = new GridList(this.items, {rows: this.options.rows});

    // Create a deep copy of the items; we use them to revert the item
    // positions after each drag change, making an entire drag operation less
    // distructable
    this._items = GridList.cloneItems(this.items);

    // Render the list for the first time
    this._applySizeToItems();
    this._applyPositionToItems();

    // Init Draggable JQuery UI plugin for each of the list items
    // http://api.jqueryui.com/draggable/
    this.$items.draggable({
      zIndex: this.items.length
    });
    this._bindDragEvents();
<commit_msg>Disable scrolling when dragging<commit_after>;(function($, window, document, undefined) {

  var DraggableGridList = function(element, options) {
    this.options = $.extend({}, this.defaults, options);
    this.$element = $(element);
    this.init();
  };

  DraggableGridList.prototype.defaults = {
    DOMDataKey: '_gridList',
    rows: 5,
    autoItemSize: false
  };

  DraggableGridList.prototype.init = function() {
    // Unbind any previous instance of DraggableGridList found on the targeted
    // element, and add a reference to the new one
    var previousInstance = this.$element.data(this.options.DOMDataKey);
    if (previousInstance instanceof DraggableGridList) {
      previousInstance._unbindDragEvents();
    }
    this.$element.data(this.options.DOMDataKey, this);

    // Read items and their meta data
    this.$items = this.$element.children('li');
    this.items = this._generateItemsFromDOM();

    // Create instance of GridList (decoupled lib for handling the grid
    // positioning and sorting post-drag and dropping)
    this.gridList = new GridList(this.items, {rows: this.options.rows});

    // Create a deep copy of the items; we use them to revert the item
    // positions after each drag change, making an entire drag operation less
    // distructable
    this._items = GridList.cloneItems(this.items);

    // Render the list for the first time
    this._applySizeToItems();
    this._applyPositionToItems();

    // Init Draggable JQuery UI plugin for each of the list items
    // http://api.jqueryui.com/draggable/
    this.$items.draggable({
      zIndex: this.items.length,
      scroll: false
    });
    this._bindDragEvents();

{'fraction_non_alphanumeric': 0.10987020827044974, 'fraction_numerical': 0.0006036824630244491, 'mean_word_length': 3.2596401028277633, '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': '1512979', 'n_tokens_mistral': 948, 'n_tokens_neox': 923, 'n_words': 279}