]> danix's work - danix.xyz-2.git/commitdiff
fix: use href for deterministic hash and increase padding for safety
authorDanilo M. <redacted>
Tue, 21 Apr 2026 21:48:20 +0000 (23:48 +0200)
committerDanilo M. <redacted>
Tue, 21 Apr 2026 21:48:20 +0000 (23:48 +0200)
themes/danix-xyz-hacker/assets/js/tag-cloud-spiral.js

index e107ed5038123fec75ceafa631e04269a79becda..68b3d9934d34080237f4e07780dd96c150922c36 100644 (file)
@@ -58,7 +58,7 @@ document.addEventListener('DOMContentLoaded', function () {
     links.forEach(function (link, i) {
       var w = sizes[i].w;
       var h = sizes[i].h;
-      var seed = hashAngle(link.textContent.trim());
+      var seed = hashAngle(link.href);
       var theta = seed;
       var placed_rect;
 
@@ -117,6 +117,6 @@ document.addEventListener('DOMContentLoaded', function () {
     });
 
     // Set container height to fit all tags + 2rem bottom padding (32px)
-    container.style.height = (maxBottom - minTop + 32) + 'px';
+    container.style.height = (maxBottom - minTop + 48) + 'px';
   });
 });