Skip to content

Commit f65ced4

Browse files
committed
cleanup
1 parent d7a2d34 commit f65ced4

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

css/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,8 @@ body {
6767
padding: 10px;
6868
font-size: 16px;
6969
}
70+
71+
.sub-header {
72+
font-size: 20px;
73+
color: darkgray;
74+
}

html/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<body>
1010
<div class="header">
1111
<h1 class="">A *</h1>
12-
Visual representation of the A* algorithm in plain js
12+
<p class="sub-header">Visual representation of the A* algorithm in plain js</p>
1313
</div>
1414
<canvas id="canvas" width="1000" height="1000"></canvas>
1515
<div class="footer grid">

js/drawing.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ function drawStartEndNodes() {
9494
ctx.fillStyle = "black";
9595
const center = square / 2;
9696

97-
ctx.fillText(startNode.text, startNode.x + center, startNode.y + center);
98-
ctx.fillText(endNode.text, endNode.x + center, endNode.y + center);
97+
// ctx.fillText(startNode.text, startNode.x + center, startNode.y + center);
98+
// ctx.fillText(endNode.text, endNode.x + center, endNode.y + center);
9999
}
100100
}
101101

@@ -123,10 +123,10 @@ function drawGrid() {
123123
ctx.textAlign = "center";
124124
ctx.textBaseline = "middle";
125125

126-
for (let i = square; i <= canvas.width - 2 * square; i += square) {
127-
ctx.fillText((i / square).toString(), square / 2, i - square / 2 + square); // Vertical
128-
ctx.fillText((i / square).toString(), i - square / 2 + square, square / 2); // Horizontal
129-
}
126+
// for (let i = square; i <= canvas.width - 2 * square; i += square) {
127+
// ctx.fillText((i / square).toString(), square / 2, i - square / 2 + square); // Vertical
128+
// ctx.fillText((i / square).toString(), i - square / 2 + square, square / 2); // Horizontal
129+
// }
130130
}
131131

132132
// fillRect(x, y, width, height)

0 commit comments

Comments
 (0)