This commit is contained in:
arne 2024-07-20 22:45:43 +02:00
commit 03cd1156e4

View file

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