Fix image generation to correctly align text in the editor

Update image editor canvas properties including width, height, x, and y to resolve text alignment issues.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/Hpj2VzR
This commit is contained in:
michaelschal committed 2025-10-11 09:15:47 +00:00
1 parent 518b31cb62
commit 1ac47b5d4b
1 file changed
+6 -1
+6 -1
View File
@@ -105,7 +105,12 @@ export default function ImageEditor() {
backgroundColor: null,
scale: 2, // Higher quality
useCORS: true,
allowTaint: true
allowTaint: true,
logging: false,
width: previewRef.current.offsetWidth,
height: previewRef.current.offsetHeight,
x: 0,
y: 0
});
// Convert canvas to blob