@@ -24,11 +24,11 @@ type Props = {
2424 entityEdited : boolean ,
2525 feedSource : Feed ,
2626 mapState : MapState ,
27- resetActiveEntity : typeof activeActions . resetActiveGtfsEntity ,
27+ resetActiveGtfsEntity : typeof activeActions . resetActiveGtfsEntity ,
2828 saveActiveGtfsEntity : typeof activeActions . saveActiveGtfsEntity ,
2929 setActiveEntity : typeof activeActions . setActiveEntity ,
3030 subComponent : string ,
31- subEntityId : number ,
31+ subEntity : number ,
3232 toggleEditFareRules : boolean => void ,
3333 updateMapSetting : typeof mapActions . updateMapSetting ,
3434 validationErrors : Array < EditorValidationIssue >
@@ -48,26 +48,26 @@ export default class EntityDetailsHeader extends Component<Props> {
4848 activeComponent,
4949 activeEntity,
5050 activePattern,
51- resetActiveEntity ,
51+ resetActiveGtfsEntity ,
5252 subComponent
5353 } = this . props
5454 if ( subComponent === 'trippattern' ) {
5555 const castedRoute = ( ( activeEntity : any ) : RouteWithPatterns )
5656 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' } )
5858 else console . warn ( `Could not locate pattern with id=${ activePattern . id } ` )
5959 } else {
60- resetActiveEntity ( { entity : activeEntity , component : activeComponent } )
60+ resetActiveGtfsEntity ( { entity : activeEntity , component : activeComponent } )
6161 }
6262 }
6363
6464 _onClickZoomTo = ( ) = > {
65- const { activeEntity, subEntityId , updateMapSetting } = this . props
65+ const { activeEntity, subEntity , updateMapSetting } = this . props
6666 let props
67- if ( subEntityId ) {
67+ if ( subEntity ) {
6868 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 }
7171 } else {
7272 props = { bounds : getEntityBounds ( activeEntity ) , target : + activeEntity . id }
7373 }
@@ -112,7 +112,7 @@ export default class EntityDetailsHeader extends Component<Props> {
112112 entityEdited,
113113 mapState,
114114 subComponent,
115- subEntityId ,
115+ subEntity ,
116116 validationErrors
117117 } = this . props
118118 const validationTooltip = (
@@ -129,7 +129,7 @@ export default class EntityDetailsHeader extends Component<Props> {
129129 const icon = GTFS_ICONS . find ( i => i . id === activeComponent )
130130 const zoomDisabled = activeEntity && ! subComponent
131131 ? mapState . target === activeEntity . id
132- : mapState . target === subEntityId
132+ : mapState . target === subEntity
133133 const iconName = icon ? icon . icon : null
134134 const nameWidth = activeComponent === 'stop' || activeComponent === 'route'
135135 ? '176px'
0 commit comments