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

Fix speed space chart round value to decimal #430

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

flomonster
Copy link
Contributor

@flomonster flomonster commented Sep 4, 2024

Fix the rounding to decimal instead of unit.

image

close OpenRailAssociation/osrd#8297

@flomonster flomonster requested a review from a team as a code owner September 4, 2024 15:57
@flomonster flomonster requested a review from Yohh September 4, 2024 15:57
@flomonster flomonster force-pushed the fam/fix-speed-space-chart-reticle branch from 21b993d to d784c1c Compare September 4, 2024 16:03
Copy link
Contributor

@Yohh Yohh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this PR

ok for the rounded adjustment

OpenRailAssociation/osrd#8297 can't be closed, .0 is still possible, we should add a condition to avoid toFixed() method if roundedPosition doesn't have a decimal

@flomonster
Copy link
Contributor Author

flomonster commented Sep 5, 2024

OpenRailAssociation/osrd#8297 can't be closed, .0 is still possible, we should add a condition to avoid toFixed() method if roundedPosition doesn't have a decimal

Good point, I also fixed it (in a second commit).

Important

This fix expose a new bug. The reticle is slightly offset from the graduations.

image

@flomonster flomonster requested a review from Yohh September 5, 2024 10:01
Copy link
Contributor

@Yohh Yohh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Math-R Math-R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍🏻

@flomonster flomonster added this pull request to the merge queue Sep 5, 2024
Merged via the queue into dev with commit 1cfd6b3 Sep 5, 2024
4 checks passed
@flomonster flomonster deleted the fam/fix-speed-space-chart-reticle branch September 5, 2024 13:44
@flomonster flomonster self-assigned this Sep 12, 2024
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.

GEV: distance of ticks always display useless .0 and the cursor distance doesn't show 100 meters
3 participants