Skip to content
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

Number input fix #19

Merged
merged 6 commits into from
Sep 12, 2024
Merged

Number input fix #19

merged 6 commits into from
Sep 12, 2024

Conversation

Kashargul
Copy link
Contributor

@Kashargul Kashargul commented Sep 6, 2024

NumberInput
-> Fixed an issue where the movement position was updated before one could reach the needed step pixels
-> Fixed an issue with float value steps not updating properly
-> Changed the focus timeout from 1 to 10 as for example in the chat, 1 was too fast

DraggableControl
-> Should Focus the input on clicks again like NumberInput

@Kashargul Kashargul marked this pull request as draft September 6, 2024 20:03
@Kashargul
Copy link
Contributor Author

There's still one case where it's not smooth....

internalValue - (internalValue % step) + stepOffset,

acts slightly sluggish when the input element is used with fractional steps and it's value is in the positive range.

When this section (internalValue % step) is removed, it's smooth... I'm guessing it's a floating precision problem? Where the previous value then is interpreted as the same as the current?

@Kashargul Kashargul marked this pull request as ready for review September 7, 2024 13:21
@ZeWaka ZeWaka merged commit 7e607b2 into tgstation:main Sep 12, 2024
1 check passed
@Kashargul Kashargul deleted the NumberInput branch September 12, 2024 06:55
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.

2 participants