fix: single-click zoom now toggles between fit-to-window and 100% pixels - #1640
Open
chuckhenrich wants to merge 1 commit into
Open
fix: single-click zoom now toggles between fit-to-window and 100% pixels#1640chuckhenrich wants to merge 1 commit into
chuckhenrich wants to merge 1 commit into
Conversation
Previously, single-click toggled between fit-to-window and 2× fit, which varied with window size and had no fixed reference point. Now toggles between fit-to-window and 100% zoom (1:1 pixels), consistent with standard photo editor conventions. Fixes CyberTimon#1639
chuckhenrich
force-pushed
the
fix/single-click-zoom-toggle
branch
from
September 1, 2026 11:41
5483a8c to
b15a9d7
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.
Description
Single-click zoom previously toggled between fit-to-window and approximately 2× the fit-to-window scale. The zoom target therefore varied with window size and had no fixed reference point, making it difficult to predict where the click would land.
This fix changes single-click to toggle between fit-to-window and 100% zoom (1 image pixel = 1 screen pixel), consistent with standard photo editing tool conventions.
Closes #1638
Closes #1639
Type of Change
Changes Made
Screenshots/Videos
Testing
Test Configuration:
Checklist
Additional Notes
The BottomBar.tsx change is a prerequisite for correct display of the 100% zoom level. Without it, floating point drift between the zoom target computation and the display percentage computation caused the display to show 99% instead of 100%.
The maxScale fix (removing Math.max(20, maxScale) in transformConfig) is included in this PR as it was a prerequisite for the correct single-click zoom target computation. It also independently fixes #1638, where the scroll wheel zoom ceiling scaled proportionally with window size rather than being fixed.
AI Disclaimer:
Please state the involvement of AI in this PR: