Skip to content
Snippets Groups Projects
Commit da7c723b authored by Tom Robinson's avatar Tom Robinson
Browse files

More robust viz fade out when resizing

parent 72f56600
No related branches found
No related tags found
No related merge requests found
......@@ -155,7 +155,10 @@ export default class QueryBuilder extends Component {
}
componentDidUpdate() {
ReactDOM.findDOMNode(this.refs.viz).style.opacity = 1.0;
let viz = ReactDOM.findDOMNode(this.refs.viz);
if (viz) {
viz.style.opacity = 1.0;
}
}
componentWillUnmount() {
......@@ -166,7 +169,10 @@ export default class QueryBuilder extends Component {
// Debounce the function to improve resizing performance.
handleResize(e) {
this.forceUpdateDebounced();
ReactDOM.findDOMNode(this.refs.viz).style.opacity = 0.2;
let viz = ReactDOM.findDOMNode(this.refs.viz);
if (viz) {
viz.style.opacity = 0.2;
}
}
render() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment