@@ -24,24 +24,23 @@ function getFill(isSelectedTrain: boolean, ecoBlocks: boolean) {
24
24
return '#333' ;
25
25
}
26
26
27
- function getSpeedAndTimeLabel ( isSelectedTrain : boolean , ecoBlocks : boolean , point : TrainPosition ) {
27
+ function getSpeedLabel ( isSelectedTrain : boolean , ecoBlocks : boolean , point : TrainPosition ) {
28
28
if ( isSelectedTrain ) {
29
29
return (
30
30
< >
31
31
< span
32
- className = { cx ( 'small' , 'font-weight-bold' , ecoBlocks ? 'text-secondary' : 'text-primary' ) }
32
+ className = { cx ( 'small' , 'train-speed-label' , ' font-weight-bold', ecoBlocks ? 'text-secondary' : 'text-primary' ) }
33
33
>
34
34
{ Math . round ( point ?. speedTime ?. speed ?? 0 ) }
35
35
km/h
36
36
</ span >
37
- { point . speedTime && < span className = "ml-2 small" > { `${ point . speedTime . time } ` } </ span > }
38
37
</ >
39
38
) ;
40
39
}
41
40
return (
42
41
< >
43
42
{ /* <small>{point.properties.name}</small> */ }
44
- < span className = "small ml-1 font-weight-bold text-muted" >
43
+ < span className = "train-speed-label small ml-1 font-weight-bold text-muted" >
45
44
{ Math . round ( point ?. speedTime ?. speed ) }
46
45
km/h
47
46
</ span >
@@ -205,7 +204,7 @@ function TrainHoverPosition(props: TrainHoverPositionProps) {
205
204
) {
206
205
const { ecoBlocks } = get ( allowancesSettings , train . id , { } as AllowancesSetting ) ;
207
206
const fill = getFill ( isSelectedTrain as boolean , ecoBlocks ) ;
208
- const label = getSpeedAndTimeLabel ( isSelectedTrain , ecoBlocks , point ) ;
207
+ const label = getSpeedLabel ( isSelectedTrain , ecoBlocks , point ) ;
209
208
210
209
const zoomLengthFactor = getzoomPowerOf2LengthFactor ( viewport ) ;
211
210
const [ trainGeoJsonPath , headTriangle , rearTriangle ] = getTrainPieces (
0 commit comments