Improve pathfinder sizing
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
|
||||
.main-grid-container{
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: center;
|
||||
|
||||
@@ -83,7 +83,7 @@ function spawnPathfinder(root) {
|
||||
let algo_select = root.getElementsByClassName("algo-select")[0];
|
||||
let maze_algo_select = root.getElementsByClassName("maze-algo-select")[0];
|
||||
|
||||
const window_y = body.scrollHeight - navbar_HTML.scrollHeight;
|
||||
const window_y = (body.scrollHeight - navbar_HTML.scrollHeight);
|
||||
const window_x = body.scrollWidth;
|
||||
|
||||
let horizontal_cells;
|
||||
@@ -101,7 +101,7 @@ function spawnPathfinder(root) {
|
||||
vertical_cells = Math.floor(window_y / 35);
|
||||
|
||||
horizontal_cells = Math.floor( (window_x - horizontal_cells) /35);
|
||||
vertical_cells = Math.floor( (window_y - vertical_cells) / 35);
|
||||
vertical_cells = Math.floor( (window_y - vertical_cells) / 35 * 0.9);
|
||||
|
||||
grid_HTML.style.width = `${horizontal_cells * 35}px`;
|
||||
grid_HTML.style.height = `${vertical_cells * 30}px`;
|
||||
|
||||
Reference in New Issue
Block a user