This commit is contained in:
@@ -582,19 +582,19 @@ const LayoutPanel: React.FC<SettingsPanelPanelProp> = ({ bookKey, onRegisterRese
|
||||
label={viewSettings.vertical ? _('Maximum Column Height') : _('Maximum Column Width')}
|
||||
value={maxInlineSize}
|
||||
onChange={setMaxInlineSize}
|
||||
disabled={maxColumnCount === 1 || viewSettings.scrolled}
|
||||
min={400}
|
||||
disabled={false}
|
||||
min={200}
|
||||
max={9999}
|
||||
step={100}
|
||||
step={50}
|
||||
/>
|
||||
<NumberInput
|
||||
label={viewSettings.vertical ? _('Maximum Column Width') : _('Maximum Column Height')}
|
||||
value={maxBlockSize}
|
||||
onChange={setMaxBlockSize}
|
||||
disabled={maxColumnCount === 1 || viewSettings.scrolled}
|
||||
disabled={false}
|
||||
min={400}
|
||||
max={9999}
|
||||
step={100}
|
||||
step={50}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
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 || isVertical
|
||||
return isVertical && false
|
||||
? Math.max(screenWidth, screenHeight, 720)
|
||||
: viewSettings.maxInlineSize!;
|
||||
};
|
||||
|
||||
+1
-1
Submodule packages/foliate-js updated: 1e23349d8f...ee3719bf85
Reference in New Issue
Block a user