diff options
author | elioat <elioat@tilde.institute> | 2025-02-17 13:03:15 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2025-02-17 13:03:15 -0500 |
commit | 86c8631eed1654c494c5a742944d9d2cdc190d77 (patch) | |
tree | 45d64998f6fbf34edea004f20253991a58a25016 /html | |
parent | 0ce65a8d957314e998981cd5852582239c39f39c (diff) | |
download | tour-86c8631eed1654c494c5a742944d9d2cdc190d77.tar.gz |
*
Diffstat (limited to 'html')
-rw-r--r-- | html/simple-shape/index.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/html/simple-shape/index.html b/html/simple-shape/index.html index 10319a6..a28d98e 100644 --- a/html/simple-shape/index.html +++ b/html/simple-shape/index.html @@ -328,7 +328,7 @@ } }; - // Modified drawGrid function to add margins and increase spacing + // Modified drawGrid function with reduced top margin const drawGrid = () => { ctx.clearRect(0, 0, canvas.width, canvas.height); @@ -337,10 +337,11 @@ const patternSize = 400; const numRows = 4; - const pageMargin = 300; + const topMargin = 100; // Reduced from 300 + const bottomMargin = 300; // Keep original bottom margin - // Calculate available space after margins - const availableHeight = canvas.height - (pageMargin * 2); + // Calculate available space with asymmetric margins + const availableHeight = canvas.height - (topMargin + bottomMargin); // Calculate row spacing with increased gaps const totalPatternHeight = numRows * patternSize; @@ -353,7 +354,7 @@ // Draw each row for(let i = 0; i < numRows; i++) { - const y = pageMargin + i * (patternSize + rowGap); + const y = topMargin + i * (patternSize + rowGap); drawPatternRow(xOffset, y, patternSize); } }; |