aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/components/instance-info.js
blob: 339d415c735af73aa9cccbaa47859b49ddd90ac6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Ember from 'ember';
import {goToDefinition} from '../utils/go-to-definition';

export default Ember.Component.extend({
  store : Ember.inject.service('store'),
  style : Ember.computed('nestedLevel',function() {
    return new Ember.String.htmlSafe("margin-left :" + this.get('nestedLevel') * 10 + "px");
  }),
  nextNestedLevel : Ember.computed('nestedLevel',function () {
    return this.get('nestedLevel') + 1;
  }),
  actions : {
    goToDefinition (event) {
      goToDefinition(this.get('store'),
                     this.get('instance.location'),
                     event.which,
                     this.get('currentLineNumber'));
      return false;
    }
  }
});