Restore WebGL control overlay and page grid
This commit is contained in:
@@ -92,7 +92,8 @@ class BookPaginationModule extends BaseModule {
|
||||
lineIndex: cursorLine,
|
||||
pageLine: geometry.pageLine,
|
||||
fontPx: layout.fontPx,
|
||||
lineHeightPx: layout.lineHeightPx
|
||||
lineHeightPx: layout.lineHeightPx,
|
||||
fontStyle: layout.fontStyle
|
||||
});
|
||||
cursorLine += 1;
|
||||
});
|
||||
@@ -108,8 +109,8 @@ class BookPaginationModule extends BaseModule {
|
||||
const typography = this.metrics.typography;
|
||||
const role = block.role || block.metadata?.role || (type === 'heading' ? 'chapter-heading' : 'body');
|
||||
const isHeading = type === 'heading' || role === 'chapter-heading' || role === 'section-heading';
|
||||
const fontPx = Math.max(1, Math.round(this.pageFormat.inchesToTexture(typography.bodyFontSizePt / 72, this.metrics.height)));
|
||||
const lineHeightPx = Math.max(fontPx + 2, Math.round(this.pageFormat.inchesToTexture(typography.lineHeightPt / 72, this.metrics.height)));
|
||||
const lineHeightPx = Math.max(1, Number(this.metrics.typographyLineHeightPx || 1));
|
||||
const fontPx = Math.max(1, Number(this.metrics.bodyFontSizePx || lineHeightPx / 1.5));
|
||||
const indent = (isHeading || block.isFirstParagraphInChapter || block.metadata?.isFirstParagraphInChapter || block.addTopSpace)
|
||||
? 0
|
||||
: lineHeightPx * 1.5;
|
||||
@@ -131,6 +132,7 @@ class BookPaginationModule extends BaseModule {
|
||||
role,
|
||||
fontPx,
|
||||
lineHeightPx,
|
||||
fontStyle: isHeading ? 'italic' : 'normal',
|
||||
lines: this.extractLines(layout, {
|
||||
measures,
|
||||
lineOffsets,
|
||||
|
||||
Reference in New Issue
Block a user