diff --git a/client/app/scripts/charts/nodes-chart.js b/client/app/scripts/charts/nodes-chart.js
index 9db84f0cb..b6101992d 100644
--- a/client/app/scripts/charts/nodes-chart.js
+++ b/client/app/scripts/charts/nodes-chart.js
@@ -48,7 +48,7 @@ const NodesChart = React.createClass({
.scaleExtent([0.1, 2])
.on('zoom', this.zoomed);
- d3.select('.nodes-chart')
+ d3.select('.canvas')
.on('click', this.handleBackgroundClick)
.call(this.zoom);
},
@@ -81,7 +81,7 @@ const NodesChart = React.createClass({
componentWillUnmount: function() {
// undoing .call(zoom)
- d3.select('.nodes-chart')
+ d3.select('.canvas')
.on('click', null)
.on('mousedown.zoom', null)
.on('onwheel', null)
@@ -161,35 +161,34 @@ const NodesChart = React.createClass({
translate = shiftTranslate;
wasShifted = true;
}
-
- if (this.state.maxNodesExceeded) {
- return (
-
-
-
- );
- }
+ const errorClassNames = this.state.maxNodesExceeded ? 'nodes-chart-error' : 'nodes-chart-error hide';
return (
-