Conversation
SharglutDev
reviewed
Sep 25, 2026
SharglutDev
left a comment
Contributor
There was a problem hiding this comment.
Thank you for the PR !
Comment on lines
+538
to
+540
| if (previousProjectionId !== selectedProjectionId && spaceTimeChartProps.xOffset) { | ||
| pan({ dx: -spaceTimeChartProps.xOffset }); | ||
| } |
Contributor
There was a problem hiding this comment.
Not sure I see the difference from the previous behavior with this new condition ?
Contributor
Author
There was a problem hiding this comment.
With this condition if we remove or add a train to the timetable, we won't loose the actual pan on the std.
| (train) => train.id === selectedProjectionId || train.id === firstOccurrenceId | ||
| ); | ||
| if (trainUsedForProjection) { | ||
| setTimeOrigin(+trainUsedForProjection.departureTime); |
Contributor
There was a problem hiding this comment.
nit: to discuss with @maelysLeratRosso but maybe it would be nice to leave a small gap on the left when centering by doing something like departureTime - 5min ?
Contributor
Author
There was a problem hiding this comment.
Good idea, if find it better too with this little offset
Contributor
Author
There was a problem hiding this comment.
Just to get an idea of both solutions:
Projection_GET.mov
Signed-off-by: Mathieu <mathieu.coulibaly@sncf.fr>
Caracol3
force-pushed
the
mcy/front-focus-train-in-std-when-projecting
branch
from
September 25, 2026 14:25
3502624 to
89de9c4
Compare
This branch has not been deployed
This file contains hidden or 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
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.
Description
Until this ticket (https://github.com/osrd-project/osrd-confidential/issues/1226) is implemented, it would be useful to be able to center the view on the newly projected train in the GET when clicking the projection button.