Skip to content

Conversation

@louisgreiner
Copy link
Contributor

Create a visual Dot for each collapsed node in a trainrun sections chain (trainrunSectionViewObject)

Code picked from mrd/demo-intermediate-collapsed-dots

Might conflict a bit with #661

@louisgreiner louisgreiner removed the request for review from aiAdrian December 4, 2025 15:49
@louisgreiner louisgreiner requested a review from emersion December 5, 2025 15:38
@emersion
Copy link
Member

emersion commented Dec 5, 2025

I wonder if we really need this PR given #661 is almost the same code. Maybe adding a method to get the number of intermediate nodes is worthwhile, but otherwise the code seems pretty similar.

Oh, I just realized we don't want to count non-stop intermediate nodes, even if they're collapsed? In other words, we only want to draw a small disc for stops?

@emersion emersion removed their request for review December 5, 2025 16:13
@louisgreiner
Copy link
Contributor Author

These changes can be added to #661 of course.

We want to draw a dot (small circle) for each intermediate stop collasped node. Intermediate non-stop nodes are not shown (= "ghost").

@emersion
Copy link
Member

emersion commented Dec 8, 2025

This PR uses trainrunsections.length - 1 to compute the number of small circles to draw. Two questions:


getCollapsedIntermediateStopCount(): number {
// Count collapsed source nodes from all trainrun sections except the first one
return this.trainrunSections.length - 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should check if the nodes are actual stops

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.

3 participants