From 197d55f819c013311a8af2b48cad8998c599bd04 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Wed, 12 Nov 2025 03:09:25 +0100 Subject: [PATCH] Rename "useReaderHorizontalModeInvertXYScrolling" to reflect actual behavior The Y scroll direction gets mapped to the X direction. And the horizontal direction gets inverted based on the reading direction. --- src/features/reader/viewer/ReaderViewer.tsx | 4 ++-- ...Scrolling.ts => useReaderHorizontalModeRevampScrolling.ts} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/features/reader/viewer/hooks/{useReaderHorizontalModeInvertXYScrolling.ts => useReaderHorizontalModeRevampScrolling.ts} (97%) diff --git a/src/features/reader/viewer/ReaderViewer.tsx b/src/features/reader/viewer/ReaderViewer.tsx index 392819e9..c83666a2 100644 --- a/src/features/reader/viewer/ReaderViewer.tsx +++ b/src/features/reader/viewer/ReaderViewer.tsx @@ -30,7 +30,7 @@ import { applyStyles } from '@/base/utils/ApplyStyles.ts'; import { withPropsFrom } from '@/base/hoc/withPropsFrom.tsx'; import { useReaderAutoScroll } from '@/features/reader/auto-scroll/hooks/useReaderAutoScroll.ts'; import { useReaderHideOverlayOnUserScroll } from '@/features/reader/overlay/hooks/useReaderHideOverlayOnUserScroll.ts'; -import { useReaderHorizontalModeInvertXYScrolling } from '@/features/reader/viewer/hooks/useReaderHorizontalModeInvertXYScrolling.ts'; +import { useReaderHorizontalModeRevampScrolling } from '@/features/reader/viewer/hooks/useReaderHorizontalModeRevampScrolling.ts'; import { useReaderHideCursorOnInactivity } from '@/features/reader/viewer/hooks/useReaderHideCursorOnInactivity.ts'; import { useReaderScrollToStartOnPageChange } from '@/features/reader/viewer/hooks/useReaderScrollToStartOnPageChange.ts'; import { useReaderHandlePageSelection } from '@/features/reader/viewer/hooks/useReaderHandlePageSelection.ts'; @@ -252,7 +252,7 @@ const BaseReaderViewer = ({ scrollElementRef, ); useReaderHideCursorOnInactivity(scrollElementRef); - useReaderHorizontalModeInvertXYScrolling(readingMode, readingDirection, scrollElementRef); + useReaderHorizontalModeRevampScrolling(readingMode, readingDirection, scrollElementRef); useReaderHideOverlayOnUserScroll(isOverlayVisible, showPreview, setShowPreview, scrollElementRef); useReaderAutoScroll( isOverlayVisible, diff --git a/src/features/reader/viewer/hooks/useReaderHorizontalModeInvertXYScrolling.ts b/src/features/reader/viewer/hooks/useReaderHorizontalModeRevampScrolling.ts similarity index 97% rename from src/features/reader/viewer/hooks/useReaderHorizontalModeInvertXYScrolling.ts rename to src/features/reader/viewer/hooks/useReaderHorizontalModeRevampScrolling.ts index 47dc16fd..84c29098 100644 --- a/src/features/reader/viewer/hooks/useReaderHorizontalModeInvertXYScrolling.ts +++ b/src/features/reader/viewer/hooks/useReaderHorizontalModeRevampScrolling.ts @@ -10,7 +10,7 @@ import { MutableRefObject, useEffect } from 'react'; import { ReadingDirection, ReadingMode } from '@/features/reader/Reader.types.ts'; import { PointerDeviceUtil } from '@/lib/PointerDeviceUtil.ts'; -export const useReaderHorizontalModeInvertXYScrolling = ( +export const useReaderHorizontalModeRevampScrolling = ( readingMode: ReadingMode, readingDirection: ReadingDirection, scrollElementRef: MutableRefObject,