Skip to content

Commit 6a7c3da

Browse files
authoredSep 9, 2024··
Fix wheel increment (#6938)
1 parent 95af02b commit 6a7c3da

File tree

1 file changed

+3
-2
lines changed
  • newIDE/app/src/UI/CompactSemiControlledNumberField

1 file changed

+3
-2
lines changed
 

‎newIDE/app/src/UI/CompactSemiControlledNumberField/index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,11 @@ const CompactSemiControlledNumberField = ({
174174
}
175175
}}
176176
onWheel={event => {
177+
// Going up is negative, going down is positive.
177178
if (event.deltaY < 0) {
178179
const newValueAsValidFloat = updateAndReturnValueAsFloatIfValid(
179180
temporaryValue,
180-
-1
181+
1
181182
);
182183
if (newValueAsValidFloat === null) return;
183184

@@ -187,7 +188,7 @@ const CompactSemiControlledNumberField = ({
187188
if (event.deltaY > 0) {
188189
const newValueAsValidFloat = updateAndReturnValueAsFloatIfValid(
189190
temporaryValue,
190-
1
191+
-1
191192
);
192193
if (newValueAsValidFloat === null) return;
193194

0 commit comments

Comments
 (0)
Please sign in to comment.