Merge pull request #82 from chanzuckerberg/freeman-lab/brush-zoom-fix

fixed brush behavior when zooming + panning
This commit is contained in:
Colin Megill
2018-06-28 01:22:39 -04:00
committed by GitHub
+1 -1
View File
@@ -204,7 +204,7 @@ class Graph extends React.Component {
2 *
(1 - pin[1] / (this.props.responsive.height - this.graphPaddingTop)) -
1;
const pout = [x + inverse[12], y + inverse[13]];
const pout = [x * inverse[14] + inverse[12], y * inverse[14] + inverse[13]];
return [(pout[0] + 1) / 2, (pout[1] + 1) / 2];
};