diff options
-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); } }; |