1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Move method to previous position

This commit is contained in:
Franz Liedke
2020-07-31 13:27:26 +02:00
parent 8b69b24272
commit 57f5ad4893

View File

@@ -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);
}
}