@@ -24,11 +24,11 @@ type Props = {
24
24
entityEdited : boolean ,
25
25
feedSource : Feed ,
26
26
mapState : MapState ,
27
- resetActiveEntity : typeof activeActions . resetActiveGtfsEntity ,
27
+ resetActiveGtfsEntity : typeof activeActions . resetActiveGtfsEntity ,
28
28
saveActiveGtfsEntity : typeof activeActions . saveActiveGtfsEntity ,
29
29
setActiveEntity : typeof activeActions . setActiveEntity ,
30
30
subComponent : string ,
31
- subEntityId : number ,
31
+ subEntity : number ,
32
32
toggleEditFareRules : boolean => void ,
33
33
updateMapSetting : typeof mapActions . updateMapSetting ,
34
34
validationErrors : Array < EditorValidationIssue >
@@ -48,26 +48,26 @@ export default class EntityDetailsHeader extends Component<Props> {
48
48
activeComponent,
49
49
activeEntity,
50
50
activePattern,
51
- resetActiveEntity ,
51
+ resetActiveGtfsEntity ,
52
52
subComponent
53
53
} = this . props
54
54
if ( subComponent === 'trippattern' ) {
55
55
const castedRoute = ( ( activeEntity : any ) : RouteWithPatterns )
56
56
const pattern = castedRoute . tripPatterns . find ( p => p . id === activePattern . id )
57
- if ( pattern ) resetActiveEntity ( { entity : pattern , component : 'trippattern' } )
57
+ if ( pattern ) resetActiveGtfsEntity ( { entity : pattern , component : 'trippattern' } )
58
58
else console . warn ( `Could not locate pattern with id=${ activePattern . id } ` )
59
59
} else {
60
- resetActiveEntity ( { entity : activeEntity , component : activeComponent } )
60
+ resetActiveGtfsEntity ( { entity : activeEntity , component : activeComponent } )
61
61
}
62
62
}
63
63
64
64
_onClickZoomTo = ( ) = > {
65
- const { activeEntity, subEntityId , updateMapSetting } = this . props
65
+ const { activeEntity, subEntity , updateMapSetting } = this . props
66
66
let props
67
- if ( subEntityId ) {
67
+ if ( subEntity ) {
68
68
const castedRoute = ( ( activeEntity : any ) : RouteWithPatterns )
69
- const pattern = castedRoute . tripPatterns . find ( p => p . id === subEntityId )
70
- props = { bounds : getEntityBounds ( pattern ) , target : subEntityId }
69
+ const pattern = castedRoute . tripPatterns . find ( p => p . id === subEntity )
70
+ props = { bounds : getEntityBounds ( pattern ) , target : subEntity }
71
71
} else {
72
72
props = { bounds : getEntityBounds ( activeEntity ) , target : + activeEntity . id }
73
73
}
@@ -112,7 +112,7 @@ export default class EntityDetailsHeader extends Component<Props> {
112
112
entityEdited,
113
113
mapState,
114
114
subComponent,
115
- subEntityId ,
115
+ subEntity ,
116
116
validationErrors
117
117
} = this . props
118
118
const validationTooltip = (
@@ -129,7 +129,7 @@ export default class EntityDetailsHeader extends Component<Props> {
129
129
const icon = GTFS_ICONS . find ( i => i . id === activeComponent )
130
130
const zoomDisabled = activeEntity && ! subComponent
131
131
? mapState . target === activeEntity . id
132
- : mapState . target === subEntityId
132
+ : mapState . target === subEntity
133
133
const iconName = icon ? icon . icon : null
134
134
const nameWidth = activeComponent === 'stop' || activeComponent === 'route'
135
135
? '176px'
0 commit comments