🐛 Bugfix: Resolve rotation reverse issue and replace scrollbar with drag interaction for image preview#2898
Open
Stockton11 wants to merge 3 commits intodevelopfrom
Open
🐛 Bugfix: Resolve rotation reverse issue and replace scrollbar with drag interaction for image preview#2898Stockton11 wants to merge 3 commits intodevelopfrom
Stockton11 wants to merge 3 commits intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes image preview interaction issues by correcting rotation behavior and replacing scrollbar-based navigation with drag-to-pan plus wheel zoom and double-click reset in the file preview drawer.
Changes:
- Added “Fit to page / Actual size” i18n strings for the image preview toolbar.
- Implemented image viewport measurement (ResizeObserver), fit/actual base scaling, drag-to-pan, wheel zoom, and double-click reset behaviors.
- Updated the image preview toolbar to include a fit/actual toggle and adjusted zoom/rotate handlers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| frontend/public/locales/zh/common.json | Adds zh translations for image “fit page” / “actual size” actions. |
| frontend/public/locales/en/common.json | Adds en translations for image “fit page” / “actual size” actions. |
| frontend/components/ui/filePreviewDrawer.tsx | Reworks image preview to support drag pan, wheel zoom, fit/actual sizing, and rotation adjustments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ction for image preview Co-authored-by: Copilot <copilot@github.com>
20752f3 to
bef7202
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.