🎨 Résolution un peu louche du chevauchement

pull/105/head
mama 2017-10-23 17:23:26 +02:00
parent 6afadb05ca
commit 9e844000c1
3 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,3 @@
#results {
position: fixed;
left: 50%;

View File

@ -35,12 +35,6 @@ h1 {
flex-direction: column;
}
#ninetyPercent {
width: 100%;
flex-grow: 1;
overflow: auto;
}
#page-type {
display: inline-block;
position: fixed;

View File

@ -25,7 +25,15 @@ const piwik = new ReactPiwik({
export default class Layout extends Component {
history = createHistory()
state = {
resultsHeight: 600
}
componentDidMount(){
let resultsEl = document.getElementById('results')
this.setState({
resultsHeight: resultsEl ? resultsEl.clientHeight : 600
})
}
render() {
let displayWarning = ["/simu/", "/regle/", "/regles"].find(
t => window.location.href.toString().indexOf(t) > -1
@ -37,7 +45,7 @@ export default class Layout extends Component {
return (
<Router history={piwik.connectToHistory(this.history)}>
<div id="main">
<div id="ninetyPercent">
<div>
<div id="header">
{ displayWarning &&
@ -62,6 +70,7 @@ export default class Layout extends Component {
<Route component={Route404} />
</Switch>
</div>
<div id="antiOverlap" style={{height: this.state.resultsHeight + 'px'}}/>
<Results />
</div>
</Router>