diff --git a/src/wordcloud2.js b/src/wordcloud2.js index 9d4c143..c5c018a 100644 --- a/src/wordcloud2.js +++ b/src/wordcloud2.js @@ -1053,7 +1053,7 @@ if (!window.clearImmediate) { : [ngx / 2, ngy / 2] // Maxium radius to look for space - maxRadius = Math.floor(Math.sqrt(ngx * ngx + ngy * ngy)) + maxRadius = Math.floor(Math.max(ngx, ngy) / 2) /* Clear the canvas only if the clearCanvas is set, if not, update the grid to the current canvas state */