fix: reduce padding to minimize gap below last bead
Use asymmetric padding to crop tighter to the active bead region: - Top: 8px (some breathing room above) - Bottom: 2px (minimal gap below last bead) - Sides: 5px This eliminates the visible gap of column post structure below the last active bead while maintaining clean spacing above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
440b492e85
commit
0e529be789
|
|
@ -128,12 +128,15 @@ svgContent = svgContent.replace(/\s*!important/g, '')
|
|||
// Calculate bounding box including posts, bar, and active beads
|
||||
const bbox = getAbacusBoundingBox(svgContent, 1.8, 2)
|
||||
|
||||
// Add padding around active beads (in abacus coordinates)
|
||||
const padding = 10
|
||||
const cropX = bbox.minX - padding
|
||||
const cropY = bbox.minY - padding
|
||||
const cropWidth = bbox.maxX - bbox.minX + padding * 2
|
||||
const cropHeight = bbox.maxY - bbox.minY + padding * 2
|
||||
// Add minimal padding around active beads (in abacus coordinates)
|
||||
// Less padding below since we want to cut tight to the last bead
|
||||
const paddingTop = 8
|
||||
const paddingBottom = 2
|
||||
const paddingSide = 5
|
||||
const cropX = bbox.minX - paddingSide
|
||||
const cropY = bbox.minY - paddingTop
|
||||
const cropWidth = bbox.maxX - bbox.minX + paddingSide * 2
|
||||
const cropHeight = bbox.maxY - bbox.minY + paddingTop + paddingBottom
|
||||
|
||||
// Calculate scale to fit cropped region into 96x96 (leaving room for border)
|
||||
const targetSize = 96
|
||||
|
|
|
|||
Loading…
Reference in New Issue