aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/components/instance-info.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/app/components/instance-info.js')
-rw-r--r--javascript/app/components/instance-info.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/javascript/app/components/instance-info.js b/javascript/app/components/instance-info.js
new file mode 100644
index 0000000..a0e04ed
--- /dev/null
+++ b/javascript/app/components/instance-info.js
@@ -0,0 +1,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;
+ }
+ }
+});