Simplify MessageListView.resetScrollPosition: no translation math
FREEBIE
This commit is contained in:
@@ -33,11 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetScrollPosition: function() {
|
resetScrollPosition: function() {
|
||||||
var scrollPosition = this.scrollPosition;
|
this.$el.scrollTop(this.scrollPosition - this.$el.outerHeight());
|
||||||
if (this.scrollHeight !== this.el.scrollHeight) {
|
|
||||||
scrollPosition = this.el.scrollHeight * this.scrollPosition / this.scrollHeight;
|
|
||||||
}
|
|
||||||
this.$el.scrollTop(scrollPosition - this.$el.outerHeight());
|
|
||||||
},
|
},
|
||||||
scrollToBottomIfNeeded: function() {
|
scrollToBottomIfNeeded: function() {
|
||||||
if (this.bottomOffset === 0) {
|
if (this.bottomOffset === 0) {
|
||||||
|
Reference in New Issue
Block a user