From 57f5ad4893891fa32309ec3cdbaf9a3cf9d87a62 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Fri, 31 Jul 2020 13:27:26 +0200 Subject: [PATCH] Move method to previous position --- js/src/forum/components/PostStream.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/js/src/forum/components/PostStream.js b/js/src/forum/components/PostStream.js index dc204420f..ed1ed34f2 100644 --- a/js/src/forum/components/PostStream.js +++ b/js/src/forum/components/PostStream.js @@ -260,6 +260,16 @@ export default class PostStream extends Component { } } + /** + * Get the distance from the top of the viewport to the point at which we + * would consider a post to be the first one visible. + * + * @return {Integer} + */ + getMarginTop() { + return this.$() && $('#header').outerHeight() + parseInt(this.$().css('margin-top'), 10); + } + /** * Scroll down to a certain post by number and 'flash' it. * @@ -345,14 +355,4 @@ export default class PostStream extends Component { flashItem($item) { $item.addClass('flash').one('animationend webkitAnimationEnd', () => $item.removeClass('flash')); } - - /** - * Get the distance from the top of the viewport to the point at which we - * would consider a post to be the first one visible. - * - * @return {Integer} - */ - getMarginTop() { - return this.$() && $('#header').outerHeight() + parseInt(this.$().css('margin-top'), 10); - } }