Explore: fix graph resize on window resize

- resize HOC wrapper only resized first child which in case of large
  graphs was the warning button
- moved warning button inside the panel parent
This commit is contained in:
David Kaltschmidt
2018-10-24 11:25:49 +02:00
parent 7d0eccdd23
commit d6ff16fe72
2 changed files with 898 additions and 906 deletions

View File

@@ -168,7 +168,8 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
const data = this.getGraphData();
return (
<>
<div className="panel-container">
{loading && <div className="explore-graph__loader" />}
{this.props.data &&
this.props.data.length > MAX_NUMBER_OF_TIME_SERIES &&
!this.state.showAllTimeSeries && (
@@ -180,12 +181,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
}`}</span>
</div>
)}
<div className="panel-container">
{loading && <div className="explore-graph__loader" />}
<div id={id} className="explore-graph" style={{ height }} />
<Legend data={data} />
</div>
</>
<div id={id} className="explore-graph" style={{ height }} />
<Legend data={data} />
</div>
);
}
}

File diff suppressed because it is too large Load Diff