Skip to content

Commit

Permalink
Merge pull request #1238 from jrjohnson/account-for-zero
Browse files Browse the repository at this point in the history
Restore Check for Zero Size
  • Loading branch information
michaelchadwick authored Jan 16, 2025
2 parents 022c661 + d89fada commit c4b5d8f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ember-simple-charts/src/components/simple-chart-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default class SimpleChartCluster extends Component {
containerWidth,
],
) => {
if (!containerHeight || !containerWidth) {
return;
}
this.loading = true;
const height = Math.min(containerHeight, containerWidth) || 0;
const width = Math.min(containerHeight, containerWidth) || 0;
Expand Down
3 changes: 3 additions & 0 deletions ember-simple-charts/src/components/simple-chart-donut.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export default class SimpleChartDonut extends Component {
containerWidth,
],
) => {
if (!containerHeight || !containerWidth) {
return;
}
this.loadingPromise = null;
const height = Math.min(containerHeight, containerWidth) || 0;
const width = Math.min(containerHeight, containerWidth) || 0;
Expand Down
3 changes: 3 additions & 0 deletions ember-simple-charts/src/components/simple-chart-pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default class SimpleChartPack extends Component {
containerWidth,
],
) => {
if (!containerHeight || !containerWidth) {
return;
}
this.loading = true;
const height = Math.min(containerHeight, containerWidth) || 0;
const width = Math.min(containerHeight, containerWidth) || 0;
Expand Down
3 changes: 3 additions & 0 deletions ember-simple-charts/src/components/simple-chart-pie.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export default class SimpleChartPie extends Component {
containerWidth,
],
) => {
if (!containerHeight || !containerWidth) {
return;
}
this.loadingPromise = null;
const height = Math.min(containerHeight, containerWidth) || 0;
const width = Math.min(containerHeight, containerWidth) || 0;
Expand Down
3 changes: 3 additions & 0 deletions ember-simple-charts/src/components/simple-chart-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default class SimpleChartTree extends Component {
containerWidth,
],
) => {
if (!containerHeight || !containerWidth) {
return;
}
this.loading = true;
const height = Math.min(containerHeight, containerWidth) || 0;
const width = Math.min(containerHeight, containerWidth) || 0;
Expand Down

0 comments on commit c4b5d8f

Please sign in to comment.