radar_parlamentar/static/files/codes/js/d3.layout.cloud.js
Function cloud
has 164 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cloud() {
var size = [256, 256],
text = cloudText,
font = cloudFont,
fontSize = cloudFontSize,
File d3.layout.cloud.js
has 351 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
(function() {
function cloud() {
var size = [256, 256],
Function cloudSprite
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function cloudSprite(d, data, di) {
if (d.sprite) return;
c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);
var x = 0,
y = 0,
Function place
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function place(board, tag, bounds) {
var perimeter = [{x: 0, y: 0}, {x: size[0], y: size[1]}],
startX = tag.x,
startY = tag.y,
maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),
Function start
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
cloud.start = function() {
var board = zeroArray((size[0] >> 5) * size[1]),
bounds = null,
n = words.length,
i = -1,
Avoid deeply nested control flow statements. Open
Open
for (var i = 0; i <= w; i++) {
board[x + i] |= (last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);
}
TODO found Open
Open
// TODO reuse arrays?
- Exclude checks
TODO found Open
Open
// TODO only check for collisions within current bounds.
- Exclude checks