<commit_before>L.BorderAction = L.EditAction.extend({
  initialize: function(map, overlay, options) {
    var edit = overlay.editing;
    var mode = edit._mode;
    var use;
    var tooltip;

    if (edit._outlined) {
      use = 'border_outer';
      tooltip = overlay.options.translation.removeBorder;
    } else {
      use = 'border_clear';
      tooltip = overlay.options.translation.addBorder;
    }

    options = options || {};
    options.toolbarIcon = {
      svg: true,
      html: use,
      tooltip: tooltip,
      className: mode === 'lock' ? 'disabled' : '',
    };

    // conditional for disabling keybindings for this action when the image is locked.
    L.DistortableImage.action_map.b = mode === 'lock' ? '' : '_toggleBorder';

    L.EditAction.prototype.initialize.call(this, map, overlay, options);
  },

  addHooks: function() {
    var edit = this._overlay.editing;

    L.IconUtil.toggleXlink(this._link, 'border_clear', 'border_outer');
    L.IconUtil.toggleTitle(this._link, 'Remove Border', 'Add Border');
    edit._toggleBorder();
  },
});
<commit_msg>Updated method creation syntax to ES6 in BorderAction.js<commit_after>L.BorderAction = L.EditAction.extend({
  initialize(map, overlay, options) {
    var edit = overlay.editing;
    var mode = edit._mode;
    var use;
    var tooltip;

    if (edit._outlined) {
      use = 'border_outer';
      tooltip = overlay.options.translation.removeBorder;
    } else {
      use = 'border_clear';
      tooltip = overlay.options.translation.addBorder;
    }

    options = options || {};
    options.toolbarIcon = {
      svg: true,
      html: use,
      tooltip: tooltip,
      className: mode === 'lock' ? 'disabled' : '',
    };

    // conditional for disabling keybindings for this action when the image is locked.
    L.DistortableImage.action_map.b = mode === 'lock' ? '' : '_toggleBorder';

    L.EditAction.prototype.initialize.call(this, map, overlay, options);
  },

  addHooks() {
    var edit = this._overlay.editing;

    L.IconUtil.toggleXlink(this._link, 'border_clear', 'border_outer');
    L.IconUtil.toggleTitle(this._link, 'Remove Border', 'Add Border');
    edit._toggleBorder();
  },
});

{'fraction_non_alphanumeric': 0.1368421052631579, 'fraction_numerical': 0.0004576659038901602, 'mean_word_length': 3.0110091743119267, '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': '2954615', 'n_tokens_mistral': 701, 'n_tokens_neox': 661, 'n_words': 153}