Skip to content

Fix misaligned EPUB navigator #593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged

Fix misaligned EPUB navigator #593

merged 1 commit into from
May 15, 2025

Conversation

mickael-menu
Copy link
Member

Fixed

Navigator

  • #449 Fixed misaligned EPUB navigator when it does not span the full screen width.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where the EPUB navigator is misaligned when it does not span the full screen width. The key changes include debouncing resize events using requestAnimationFrame, replacing orientation handling with viewport width calculation, and updating log messages for invalid scroll positions.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Sources/Navigator/EPUB/Scripts/src/utils.js Introduces debounced resize handling and replaces orientation logic with viewportWidth.
CHANGELOG.md Updates changelog to document the fix for issue #449.
Comments suppressed due to low confidence (1)

Sources/Navigator/EPUB/Scripts/src/utils.js:158

  • [nitpick] Consider using a logging method consistent with the rest of the codebase; if the invalid position is not a critical error, using console.warn may be more appropriate than console.error.
console.error(`Expected a valid progression in scrollToPosition, got ${position}`);

@mickael-menu mickael-menu merged commit 2a4ff02 into develop May 15, 2025
5 checks passed
@mickael-menu mickael-menu deleted the issue/449 branch May 15, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigator.go results in misaligned view
1 participant