Fix WebGL right page content layout

This commit is contained in:
2026-06-06 01:28:42 +02:00
parent 32d2a6a15a
commit 874d360d22
+3 -1
View File
@@ -2000,7 +2000,9 @@ function drawTitlePage(ctx, layout) {
} }
function drawNovelPage(ctx, layout, text) { function drawNovelPage(ctx, layout, text) {
drawParagraph(ctx, text, layout.x, layout.y, layout.width, layout.em * 0.98, 1.36, layout.em * 1.25); const projectedX = Math.max(layout.margins.left * 0.25, layout.x - layout.margins.left * 0.75);
const projectedWidth = layout.width * 0.7;
drawParagraph(ctx, text, projectedX, layout.y + layout.height * 0.1, projectedWidth, layout.em * 0.72, 1.36, 0);
} }
function drawCentered(ctx, text, y, size, x = 0, width = ctx.canvas.width) { function drawCentered(ctx, text, y, size, x = 0, width = ctx.canvas.width) {