[mapbox] fix viewport alterations (#3293)

* [mapbox] fix viewport alterations

Since explorev2 it appears that altering the viewport hasn't been
changing the controls as it used to. This PR addresses it.

* lint
This commit is contained in:
Maxime Beauchemin
2017-08-16 11:23:01 -07:00
committed by GitHub
parent d1d1c49009
commit ccf505a480
3 changed files with 14 additions and 15 deletions

View File

@@ -178,7 +178,8 @@ class ChartContainer extends React.PureComponent {
const mockSlice = this.getMockedSliceObject();
this.setState({ mockSlice });
try {
visMap[this.props.viz_type](mockSlice, this.props.queryResponse);
const viz = visMap[this.props.viz_type];
viz(mockSlice, this.props.queryResponse, this.props.actions.setControlValue);
} catch (e) {
this.props.actions.chartRenderingFailed(e);
}