Skip to content

Commit cb44087

Browse files
committed
front: fix projected train icon when ellipsis
1 parent ed45fd3 commit cb44087

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

front/src/modules/trainschedule/components/Timetable/TimetableTrainCard.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,14 @@ const TimetableTrainCard = ({
178178
/>
179179
</div>
180180
<div title={train.trainName} className="checkbox-label">
181-
{projectionPathIsUsed && (
182-
<div className="train-projected">
183-
<Manchette iconColor="var(--white100)" />
184-
</div>
185-
)}
186-
{train.trainName}
181+
<div className="train-info">
182+
{projectionPathIsUsed && (
183+
<div className="train-projected">
184+
<Manchette iconColor="var(--white100)" />
185+
</div>
186+
)}
187+
<span className="train-name">{train.trainName}</span>
188+
</div>
187189
</div>
188190
</div>
189191
<div className="rolling-stock">

front/src/styles/scss/applications/operationalStudies/_scenario.scss

+11
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,24 @@
368368
background-color: var(--info30);
369369
border-radius: 4px;
370370
position: relative;
371+
flex-shrink: 0;
371372
svg {
372373
position: absolute;
373374
top: 0;
374375
left: 0;
375376
transform: translate(2px, 2px);
376377
}
377378
}
379+
.train-info {
380+
display: flex;
381+
align-items: center;
382+
min-width: 0;
383+
}
384+
.train-name {
385+
overflow: hidden;
386+
text-overflow: ellipsis;
387+
white-space: nowrap;
388+
}
378389
}
379390

380391
.scenario-timetable-toolbar {

0 commit comments

Comments
 (0)