Fix zooming regression

Introduced in #1186

Fixes #1233
This commit is contained in:
David Kaltschmidt
2016-04-06 15:23:13 +02:00
parent f34146d068
commit 392589744c

View File

@@ -348,7 +348,7 @@ export default class NodesChart extends React.Component {
const zoomFactor = Math.min(xFactor, yFactor);
let zoomScale = this.state.scale;
if (!this.props.hasZoomed && zoomFactor > 0 && zoomFactor < 1) {
if (!state.hasZoomed && zoomFactor > 0 && zoomFactor < 1) {
zoomScale = zoomFactor;
// saving in d3's behavior cache
this.zoom.scale(zoomFactor);