Oops, missed a file.

This commit is contained in:
Robin Ward 2014-05-02 17:28:56 -04:00
parent 2eb923150a
commit 2ddbdac757
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
export default Em.Component.extend({
classNameBindings: [':logs'],
render: function(buffer) {
buffer.push(this.get('output'));
},
_outputChanged: function() {
Em.run.scheduleOnce('afterRender', this, '_scrollBottom');
this.rerender();
}.observes('output'),
_scrollBottom: function() {
if (this.get('followOutput')) {
this.$().scrollTop(this.$()[0].scrollHeight);
}
},
_scrollOnInsert: function() {
this._scrollBottom();
}.on('didInsertElement')
});