container.style.display = 'block';
container.classList.remove('flex', 'flex-wrap');
- var padding = 8; // px gap between tags
- var aStep = 0.3; // radians per spiral step
- var rScale = (containerWidth * 0.018); // spiral tightness
+ var padding = -2; // px gap between tags (negative allows ~2px edge overlap)
+ var aStep = 0.2; // radians per spiral step
+ var rScale = (containerWidth * 0.013); // spiral tightness
var minTop = Infinity, maxBottom = -Infinity;
var placed_rect;
// Step along spiral until no collision
- for (var attempt = 0; attempt < 2000; attempt++) {
+ for (var attempt = 0; attempt < 3000; attempt++) {
var r = rScale * theta;
var x = cx + r * Math.cos(theta) - w / 2;
var y = r * Math.sin(theta) - h / 2;