Checkpoint line-grid renderer state

This commit is contained in:
2026-05-16 15:57:03 +02:00
parent fe33e4f0ab
commit b9ae7f71c5
5 changed files with 49 additions and 190 deletions
+2 -9
View File
@@ -751,15 +751,8 @@ class SentenceQueueModule extends BaseModule {
await document.fonts.ready;
}
const probe = document.createElement('p');
probe.style.visibility = 'hidden';
probe.style.position = 'absolute';
probe.style.left = '-8000px';
probe.style.top = '-8000px';
storyElement.appendChild(probe);
const computedStyle = window.getComputedStyle(probe);
const computedStyle = window.getComputedStyle(storyElement);
const lineHeight = parseFloat(computedStyle.lineHeight) || 24;
probe.remove();
const pageWidth = storyElement.clientWidth;
const requestedSize = String(metadata.size || 'landscape').toLowerCase();
@@ -782,7 +775,7 @@ class SentenceQueueModule extends BaseModule {
if (isPortrait) {
this.activeImageWrap = {
lines: lineCount + 1,
lines: lineCount,
width: width + imageGap,
imageWidth: width,
gap: imageGap,