Check start visibility more often

This commit is contained in:
Antti Pilto 2018-10-01 21:19:12 +03:00
parent 684ab3bcb5
commit 641d031bdf
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ class ChooseCharacters extends Component {
window.removeEventListener('scroll', this.testIsStartVisible);
}
componentDidUpdate(prevProps, prevState) {
this.testIsStartVisible();
}
testIsStartVisible() {
if(this.startRef) {
const rect = this.startRef.getBoundingClientRect();