Adjust spacing
[brackets.git] / frontend / index.js
index e99deba..6385dbe 100644 (file)
@@ -76,7 +76,7 @@ const drawBranchFrom = (ctx, x, y, xDist, yDist, left, up) => {
 }
 
 const drawArtistOnCtx = (ctx, artistName, x, y) => {
-    ctx.font = "1em sans serif";
+    ctx.font = "20px sans serif";
     ctx.strokeText(artistName, x, y);
 }
 
@@ -137,8 +137,8 @@ const drawBracket = (canvas, artists, genre) => {
     for (let group = 1; group <= groups; group++) {
             drawMatchup(
                 canvas,
-                mid_x + (Math.pow(-1, group) * (rect_width / 4)),
-                mid_y + (Math.pow(-1, Math.floor(group / 2)) * (rect_height * 2)),
+                mid_x + (Math.pow(-1, group) * (rect_width / 6)),
+                mid_y + (Math.pow(-1, Math.floor(group / 2)) * (rect_height * 2.5)),
                 0,
                 rounds,
                 Math.pow(-1, group),
@@ -156,7 +156,7 @@ window.onload = () => {
     const canvas = document.getElementById("bracket");
 
     const formSubmitAction = () => {
-        fetch(encodeURI(`http://localhost:8080/artist/genre?genre_name=${genreInput.value}`))
+        fetch(encodeURI(`http://api.brackets.jacobcasper.com/artist/genre?genre_name=${genreInput.value}`))
         .then((response) => response.json())
         .then((data) => drawBracket(canvas, data.slice(0, 33), genreInput.value));
     }
@@ -169,7 +169,7 @@ window.onload = () => {
     }
     let genres = JSON.parse(lStorage.getItem("genres"))
     if (genres === null) {
-        fetch("http://localhost:8080/genre")
+        fetch("http://api.brackets.jacobcasper.com/genre")
             .then((response) => response.text())
             .then((text) => {
                 window.localStorage.setItem("genres", text);