Skip to content

Commit 7a165c1

Browse files
committed
fixed BST centering
1 parent f593371 commit 7a165c1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/BST.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#tree {
88
display: flex;
99
flex-direction: column;
10+
align-items: center;
1011
gap: 20px;
1112
height: 30vh;
1213
}

src/typescript/BST.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ function updateTraversals(tree: BinaryTree) {
281281
}
282282

283283
function updateCanvasProperties(ctx: CanvasRenderingContext2D) {
284-
canvas.style.width = '50vw';
284+
canvas.style.width = '100%';
285285
canvas.style.height = '50vh';
286286
canvas.width = canvas.offsetWidth;
287287
canvas.height = canvas.offsetHeight;

0 commit comments

Comments
 (0)