Skip to content

Commit

Permalink
CR1
Browse files Browse the repository at this point in the history
  • Loading branch information
kravets-levko committed Jul 3, 2019
1 parent 20bd101 commit 339122f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion client/app/visualizations/box-plot/Renderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ export default function Renderer({ data, options }) {
useEffect(() => {
if (container) {
render(container, data, options);
return resizeObserver(container, () => {
const unwatch = resizeObserver(container, () => {
render(container, data, options);
});
return unwatch;
}
}, [container, data, options]);

Expand Down
2 changes: 1 addition & 1 deletion client/app/visualizations/box-plot/renderer.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.box-plot-deprecated-visualization-container {
overflow: hidden;
height: 400px;
height: 500px;
}
3 changes: 2 additions & 1 deletion client/app/visualizations/word-cloud/Renderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,13 @@ export default function Renderer({ data, options }) {

useEffect(() => {
if (container) {
return resizeObserver(container, () => {
const unwatch = resizeObserver(container, () => {
const svg = container.querySelector('svg');
if (svg) {
scaleElement(svg, container);
}
});
return unwatch;
}
}, [container]);

Expand Down
8 changes: 4 additions & 4 deletions client/cypress/integration/visualizations/box_plot_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ describe('Box Plot', () => {
'BoxPlot.YAxisLabel': 'Y Axis',
});

// Wait for proper initialization of visualization
cy.wait(500); // eslint-disable-line cypress/no-unnecessary-waiting

cy.getByTestId('VisualizationPreview').find('svg').should('exist');

cy.percySnapshot('Visualizations - Box Plot');
cy.viewport(1280, 1024);
cy.wait(500); // eslint-disable-line cypress/no-unnecessary-waiting
cy.screenshot();
cy.percySnapshot('Visualizations - Box Plot', { widths: [1280] });
});
});

0 comments on commit 339122f

Please sign in to comment.