Try to fix screen resolution issue
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user