Oops, missed a file.
This commit is contained in:
parent
2eb923150a
commit
2ddbdac757
|
@ -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')
|
||||
});
|
||||
|
Loading…
Reference in New Issue