Skip to content

Commit

Permalink
Bug fix for infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
fanthos committed Dec 15, 2017
1 parent f9beedb commit 4182bb6
Show file tree
Hide file tree
Showing 3 changed files with 7,394 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ rules:
max-nested-callbacks: 0
max-params: 0
max-statements-per-line: 0
max-statements: [2, 30]
max-statements: 0
multiline-ternary: 0
new-cap: 0
new-parens: 2
Expand Down
2 changes: 2 additions & 0 deletions src/core/core.layoutService.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ module.exports = function(Chart) {
// Step 1
var chartWidth = width - leftPadding - rightPadding;
var chartHeight = height - topPadding - bottomPadding;
if (chartWidth < 0) chartWidth = 0;
if (chartHeight < 0) chartHeight = 0;
var chartAreaWidth = chartWidth / 2; // min 50%
var chartAreaHeight = chartHeight / 2; // min 50%

Expand Down
Loading

0 comments on commit 4182bb6

Please sign in to comment.