<commit_before>import Ember from 'ember';

export default Ember.Component.extend({
    showSettings: false,
    showLayer : true,
    didReceiveAttrs() {
        this._super(...arguments);
        if(this.get("layer").component === "layer-title"){
            this.set('showLayer', false);

        }else{
          this.set('showLayer', true);
        }
     },
    theme: Ember.computed('themes', 'layer.settings.properties.themeId', function(){
        return this.get('themes').filter((item)=>{
            return item.id === this.get('layer.settings.properties.themeId');
        })[0];
    }),
    lastIndex: Ember.computed('layers',function (){
       return  this.get('layers').length-1;
    }),
    actions: {
        showSettings (){
            this.set('showSettings', true);
        },
        moveBefore(index){
            let layers = this.get('layers');
            let removed = layers.objectAt(index);
            layers.insertAt(index-1, removed);
            layers.removeAt(index+1);
        },
        moveAfter(index){
            let layers = this.get('layers');
            let removed = layers.objectAt(index);
            layers.insertAt(index+2, removed);
            layers.removeAt(index);
        }
    }
});
<commit_msg>Update to follow Airbnb style standards<commit_after>import Ember from 'ember';

export default Ember.Component.extend({
    showSettings: false,
    showLayer : true,
    didReceiveAttrs() {
        this._super(...arguments);
        if(this.get('layer').component === 'layer-title'){
            this.set('showLayer', false);

        }else{
          this.set('showLayer', true);
        }
     },
    theme: Ember.computed('themes', 'layer.settings.properties.themeId', function(){
        return this.get('themes').filter((item)=>{
            return item.id === this.get('layer.settings.properties.themeId');
        })[0];
    }),
    lastIndex: Ember.computed('layers',function (){
       return  this.get('layers').length-1;
    }),
    actions: {
        showSettings (){
            this.set('showSettings', true);
        },
        moveBefore(index){
            let layers = this.get('layers');
            let removed = layers.objectAt(index);
            layers.insertAt(index-1, removed);
            layers.removeAt(index+1);
        },
        moveAfter(index){
            let layers = this.get('layers');
            let removed = layers.objectAt(index);
            layers.insertAt(index+2, removed);
            layers.removeAt(index);
        }
    }
});

{'fraction_non_alphanumeric': 0.15639810426540285, 'fraction_numerical': 0.0039494470774091624, 'mean_word_length': 2.1194581280788176, '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': '5383140', 'n_tokens_mistral': 720, 'n_tokens_neox': 708, 'n_words': 121}