<commit_before>import Ember from 'ember';
import layout from './template';


const {
  $,
  get,
  set,
  run,
  isPresent,
  computed,
  isEmpty,
  guidFor
} = Ember;

// Perfect Scrollbar scroll events
const psEvents = [
  'ps-scroll-y',
  'ps-scroll-x',
  'ps-scroll-up',
  'ps-scroll-down',
  'ps-scroll-left',
  'ps-scroll-right',
  'ps-y-reach-start',
  'ps-y-reach-end',
  'ps-x-reach-start',
  'ps-x-reach-end'
];

let prop = function(key) {
	return get(this, key);
};

export default Ember.Component.extend({
  layout: layout,

  // Internal id for element
  scrollId: null,

  // Perfect scrollbar related settings
  wheelSpeed: 1,
  wheelPropagation: false,
  swipePropagation: true,
  minScrollbarLength: null,
  maxScrollbarLength: null,
  useBothWheelAxes: false,
  useKeyboard: true,
  suppressScrollX: false,
  suppressScrollY: false,
  scrollTop: 0,
  scrollLeft: 0,
  scrollXMarginOffset: 0,
  scrollYMarginOffset: 0,
  includePadding: false,

  didInsertElement() {
    this._super(...arguments);
    prop = prop.bind(this);
    window.Ps.initialize($(`#${prop('eId')}`)[0], this._getOptions());
    this.bindEvents();
  },

  willDestroyElement() {
    this._super(...arguments);

    run.schedule('afterRender', () => {
      window.Ps.destroy(document.getElementById(prop('eId')));
      this.unbindEvents();
    });
  },
<commit_msg>update(component) use es6 function shorthand for 'afterRender'<commit_after>import Ember from 'ember';
import layout from './template';


const {
  $,
  get,
  set,
  run,
  isPresent,
  computed,
  isEmpty,
  guidFor
} = Ember;

// Perfect Scrollbar scroll events
const psEvents = [
  'ps-scroll-y',
  'ps-scroll-x',
  'ps-scroll-up',
  'ps-scroll-down',
  'ps-scroll-left',
  'ps-scroll-right',
  'ps-y-reach-start',
  'ps-y-reach-end',
  'ps-x-reach-start',
  'ps-x-reach-end'
];

let prop = function(key) {
	return get(this, key);
};

export default Ember.Component.extend({
  layout: layout,

  // Internal id for element
  scrollId: null,

  // Perfect scrollbar related settings
  wheelSpeed: 1,
  wheelPropagation: false,
  swipePropagation: true,
  minScrollbarLength: null,
  maxScrollbarLength: null,
  useBothWheelAxes: false,
  useKeyboard: true,
  suppressScrollX: false,
  suppressScrollY: false,
  scrollTop: 0,
  scrollLeft: 0,
  scrollXMarginOffset: 0,
  scrollYMarginOffset: 0,
  includePadding: false,

  didInsertElement() {
    this._super(...arguments);
    prop = prop.bind(this);

    run.schedule('afterRender', () => {
      window.Ps.initialize($(`#${prop('eId')}`)[0], this._getOptions());
      this.bindEvents();
    });
  },

  willDestroyElement() {
    this._super(...arguments);

    window.Ps.destroy(document.getElementById(prop('eId')));
    this.unbindEvents();
  },

{'fraction_non_alphanumeric': 0.15930485155684287, 'fraction_numerical': 0.004706734250543085, 'mean_word_length': 3.5594059405940595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5001861', 'n_tokens_mistral': 997, 'n_tokens_neox': 978, 'n_words': 194}