Fix Jittery editor mouse wheel zoom when setting window.zoomLevel = 1#227916
Merged
alexdima merged 2 commits intomicrosoft:mainfrom Jul 14, 2025
Merged
Fix Jittery editor mouse wheel zoom when setting window.zoomLevel = 1#227916alexdima merged 2 commits intomicrosoft:mainfrom
alexdima merged 2 commits intomicrosoft:mainfrom
Conversation
dbe32e8 to
d4f1de1
Compare
Duck1992
approved these changes
Sep 11, 2024
d4f1de1 to
60ba700
Compare
cae43d0 to
29d061b
Compare
29d061b to
5c91cf9
Compare
Contributor
Author
|
Hi @alexdima , Could you please review the changes I made and let me know if they're ready to be merged or if anything needs to be revised? |
f784e3b to
72f55d8
Compare
alexdima
approved these changes
Jul 14, 2025
DonJayamanne
approved these changes
Jul 14, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Related Issue
Fixes #225759
Changes
_isAlmostIntmethod in theMouseWheelClassifierclass to increase the margin of error.0.01to0.01 + Number.EPSILON * 100(approximately 0.010000000000022205).Reason for Change
To account for floating-point errors in certain zoom level calculations.
Previous Behavior
deltaY = 0.996 ~ 1and_isAlmostIntcorrectly returnedtrue.deltaYof 0.9899999999999999,_isAlmostIntincorrectly returnedfalse.New Behavior
_isAlmostIntnow correctly returnstruefor zoom level 1 cases, as intended.Testing
_isAlmostIntreturnstruefordeltaYvalues very close to 1.Additional Notes
This change helps maintain consistent behavior across different zoom levels, addressing edge cases where floating-point precision was causing unexpected results.