This commit is contained in:
2025-09-10 23:19:18 +10:00
parent b21b887adc
commit a2bd089730
3 changed files with 5 additions and 7 deletions

View File

@@ -7,7 +7,7 @@
import clsx from 'clsx'; import clsx from 'clsx';
import { Input } from '../ui/input'; import { Input } from '../ui/input';
import type { LeadMsg } from './messages'; import type { LeadMsg } from './messages';
import { grid, Position } from './grid.svelte.ts'; import { Grid, Position } from './grid.svelte.ts';
let { let {
socket, socket,
@@ -31,7 +31,8 @@
grid.handle_msg(res); grid.handle_msg(res);
}; };
let rows = 50; const grid = new Grid(socket);
let rows = 100;
let cols = 40; let cols = 40;
function handleCellInteraction(i: number, j: number, e: MouseEvent) { function handleCellInteraction(i: number, j: number, e: MouseEvent) {

View File

@@ -208,7 +208,4 @@ class Grid {
} }
} }
export { Position }; export { Position, Grid };
export const grid = new Grid(new WebSocket(''));

View File

@@ -19,7 +19,7 @@
{/if} {/if}
<div class="absolute left-0 min-h-0 w-full"> <div class="absolute left-0 min-h-0 w-full">
<div class="flex h-[100vh] flex-col"> <div class="flex h-[93vh] flex-col">
<div class="h-[60px] w-full p-3"> <div class="h-[60px] w-full p-3">
<div class="flex items-center gap-5"> <div class="flex items-center gap-5">
<Sidebar.Trigger /> <Sidebar.Trigger />