Skip to content

Conversation

@gozafar
Copy link

@gozafar gozafar commented Jul 25, 2025

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Issue:
When using the ruler with fractional units (e.g., 0.1, 0.25), the displayed value doesn't update correctly. This happens because parseInt() is used on the value before rendering, which causes the fractional part to be discarded. As a result, values like 1.5 are parsed as 1, and the UI doesn't reflect the correct measurement.

Fix:
I replaced all instances of parseInt(prevValue.current) with Number(prevValue.current) and formatted the result using .toFixed(fractionDigits). This ensures that fractional values are preserved and displayed correctly in the ruler view.

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.

1 participant