feat(scroll): add single section scroll option, closes #3663 (#3668)

This commit is contained in:
Huang Xin
2026-03-28 13:57:20 +08:00
committed by GitHub
parent bbfc82e50d
commit c4e3315642
35 changed files with 99 additions and 30 deletions
@@ -609,6 +609,11 @@ const FoliateViewer: React.FC<{
viewRef.current?.renderer.setAttribute('gap', `${viewSettings.gapPercent}%`);
if (viewSettings.scrolled) {
viewRef.current?.renderer.setAttribute('flow', 'scrolled');
if (viewSettings.noContinuousScroll) {
viewRef.current?.renderer.setAttribute('no-continuous-scroll', '');
} else {
viewRef.current?.renderer.removeAttribute('no-continuous-scroll');
}
}
};
@@ -694,6 +699,7 @@ const FoliateViewer: React.FC<{
viewSettings?.showBarsOnScroll,
viewSettings?.showMarginsOnScroll,
viewSettings?.scrolled,
viewSettings?.noContinuousScroll,
viewState?.ttsEnabled,
]);