Try to fix screen resolution issue

This commit is contained in:
Scott E. Graves
2019-04-08 23:07:08 -05:00
parent 9ad2f798da
commit 177fd97c4b

View File

@@ -7,8 +7,13 @@ export default CSSModules(class extends Component {
constructor(props) {
super(props);
window.addEventListener("resize", this.updateSizeAsync);
this.checkSizeInterval = setInterval(()=> {
this.updateSize()
}, 2000);
}
checkSizeInterval;
state = {
calculated: false,
dimensions: {
@@ -59,6 +64,7 @@ export default CSSModules(class extends Component {
componentWillUnmount = () => {
window.removeEventListener("resize", this.updateSizeAsync);
clearInterval(this.checkSizeInterval);
};
render() {