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]]]