Simplify MessageListView.resetScrollPosition: no translation math
FREEBIE
This commit is contained in:
parent
bfdb8254a4
commit
73f2a4a0fb
1 changed files with 1 additions and 5 deletions
|
@ -33,11 +33,7 @@
|
|||
}
|
||||
},
|
||||
resetScrollPosition: function() {
|
||||
var scrollPosition = this.scrollPosition;
|
||||
if (this.scrollHeight !== this.el.scrollHeight) {
|
||||
scrollPosition = this.el.scrollHeight * this.scrollPosition / this.scrollHeight;
|
||||
}
|
||||
this.$el.scrollTop(scrollPosition - this.$el.outerHeight());
|
||||
this.$el.scrollTop(this.scrollPosition - this.$el.outerHeight());
|
||||
},
|
||||
scrollToBottomIfNeeded: function() {
|
||||
if (this.bottomOffset === 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue