feat: support separate header/footer visibility for paginated and scrolled modes (#859)
This commit is contained in:
@@ -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!;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user