MessageListView.measureScrollPosition: reuse variables

This commit is contained in:
Scott Nonnenberg 2017-05-30 10:39:42 -07:00
parent c5530b7235
commit 13a91eece8

View file

@ -33,7 +33,7 @@
this.outerHeight = this.$el.outerHeight();
this.scrollPosition = this.$el.scrollTop() + this.outerHeight;
this.scrollHeight = this.el.scrollHeight;
this.bottomOffset = this.scrollHeight - this.$el.scrollTop() - this.outerHeight;
this.bottomOffset = this.scrollHeight - this.scrollPosition;
},
resetScrollPosition: function() {
this.$el.scrollTop(this.scrollPosition - this.$el.outerHeight());