fix(web): lecteurs CBZ/CBR et PDF — évaluer la capacité de défilement du cadre à chaque frame de la sync initiale au lieu d'abandonner avant rendu du contenu (6e correctif bug #39)
This commit is contained in:
@ -115,13 +115,12 @@ export function CbzReader({
|
||||
const scheduleInitialVisibleSync = useCallback(
|
||||
(stage: HTMLElement) => {
|
||||
clearVerticalInitialSync();
|
||||
if (!(stage.scrollHeight > stage.clientHeight)) return;
|
||||
verticalInitialSyncAttemptRef.current = 0;
|
||||
|
||||
const sync = () => {
|
||||
verticalInitialSyncFrameRef.current = null;
|
||||
if (verticalUserScrollRef.current || verticalInitialSyncDoneRef.current) return;
|
||||
if (verticalTrackingReadyRef.current && stage.scrollTop > Math.max(32, stage.clientHeight * 0.5)) {
|
||||
if (verticalTrackingReadyRef.current && stage.scrollHeight > stage.clientHeight && stage.scrollTop > Math.max(32, stage.clientHeight * 0.5)) {
|
||||
commitVisiblePage(stage, true);
|
||||
}
|
||||
verticalInitialSyncAttemptRef.current += 1;
|
||||
|
||||
Reference in New Issue
Block a user