-
Notifications
You must be signed in to change notification settings - Fork 5
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
ui-spacetimechart: implements "splitting" #919
Merged
Merged
Conversation
This file contains 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
9c8aa00
to
e01e068
Compare
e01e068
to
1b67604
Compare
Yohh
reviewed
Feb 24, 2025
40aca82
to
78cde61
Compare
Yohh
reviewed
Feb 25, 2025
Yohh
approved these changes
Feb 25, 2025
theocrsb
approved these changes
Feb 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and tested
Math-R
reviewed
Feb 26, 2025
Akctarus
approved these changes
Feb 26, 2025
theocrsb
reviewed
Feb 26, 2025
78cde61
to
31f8257
Compare
This commit simply adds some trains that go back and forth in the stories, to test that things work properly with directions changes. Signed-off-by: Alexis Jacomy <[email protected]>
Details: - Moves getDirection from PathLayer to new utils/paths.ts, renames it getPathDirection - Adds options to look for direction from a given point, going forward or backward - Adds unit tests - Fixes drawExtremities in PathLayer, so that it looks for local path direction, and properly handles paths with U-turns Signed-off-by: Alexis Jacomy <[email protected]>
This commit fixes osrd-project/osrd-confidential#870. Details: - Updates getSpaceBreakpoints to no more deduplicate repeted values (those repeted values are now used to detect flat steps) - Updates getNormalizedScaleAtPosition to accept an option to return last matching scale instead of first (important now that a single position can match multiple pixel positions) - Similarly updates getSpaceToPixel to return a function that accepts a new fromEnd option - Fixes getPathSegments in PathLayer to properly handle flat steps - Renders space graduations twice on flat steps (one before, one after) - Renders path pauses twice on flat steps as well (one before, one after) - Adds a new story to showcase how to split the space time chart Signed-off-by: Alexis Jacomy <[email protected]>
31f8257
to
ba148d7
Compare
Math-R
approved these changes
Feb 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm !
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request addresses issue osrd-project/osrd-confidential#870.
It allows giving a SpaceTimeChart flat steps, i.e.
SpaceScales
with ato
value equal to the previous one's (where the chart is effectively split). Then, it adds a story that combines flat steps with a custom layer, to overdraw flat steps with a custom component.Details:
getPathDirection
, to handle trains that change directionsgetSpaceBreakpoints
to no more deduplicate repeated values, which allows easily detecting flat stepsgetNormalizedScaleAtPosition
andgetSpaceToPixel
to allow retrieving both sides of the flat stepsgetPathSegments
with flat steps