feat: support separate header/footer visibility for paginated and scrolled modes (#859)

This commit is contained in:
Huang Xin
2025-04-11 09:40:26 +08:00
committed by GitHub
parent fe25c3e995
commit ccd467ebcf
29 changed files with 264 additions and 147 deletions
+2 -1
View File
@@ -2,11 +2,12 @@ import { ViewSettings } from '@/types/book';
export const getMaxInlineSize = (viewSettings: ViewSettings) => {
const isScrolled = viewSettings.scrolled!;
const isVertical = viewSettings.vertical!;
const maxColumnCount = viewSettings.maxColumnCount!;
const screenWidth = window.innerWidth;
const screenHeight = window.innerHeight;
return maxColumnCount === 1 || isScrolled
return maxColumnCount === 1 || isScrolled || isVertical
? Math.max(screenWidth, screenHeight, 720)
: viewSettings.maxInlineSize!;
};