From 03cd1156e4da45e8346d7831b64b22329af4dfc8 Mon Sep 17 00:00:00 2001 From: arne Date: Sat, 20 Jul 2024 22:45:43 +0200 Subject: [PATCH] TMP --- src/main.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 810cb4b..71089f1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -96,9 +96,9 @@ const scene = sync({ xSeeds, ySeeds, }) => { + // calculate available drawing area const [width, height] = size - // calculate available drawing area const xCells = Math.max(0, Math.floor((width - 2 * padding * cellSize) / cellSize)) const xPadding = (width - (xCells * cellSize)) / 2 @@ -117,6 +117,9 @@ const scene = sync({ ) }) +// everything below is creating the dom and mounting it; this will update according to +// the current values of the reactive streams we define above. + const input = (label: string, attrs: any) => ["div", {}, ["label", {}, label, ["input", attrs]]]