@@ -71,10 +71,10 @@ class LinkView extends React.Component<ILinkViewProps, ILinkViewState> {
7171 async componentDidMount ( ) {
7272 this . _isMounted = true ;
7373 if ( this . props . isNewLink ) {
74- console . log ( '************ new link ************ ' )
74+ console . log ( 'new link' )
7575 await this . initNewLink ( )
7676 } else {
77- console . log ( '************ existing link ************ ' )
77+ console . log ( 'existing link' )
7878 await this . initExistingLink ( )
7979 }
8080 this . props . linkStore ! . setIsEditingDisabled ( ! this . props . isNewLink ) ;
@@ -105,28 +105,34 @@ class LinkView extends React.Component<ILinkViewProps, ILinkViewState> {
105105
106106 const [ startNodeId , endNodeId , transitTypeCode ] = this . props . match ! . params . id . split ( ',' ) ;
107107
108- console . log ( '************ initExistingLink ************ ' )
108+ console . log ( 'initExistingLink' )
109109 console . log ( this . props )
110+ console . log ( startNodeId , endNodeId , transitTypeCode )
110111 if ( startNodeId && endNodeId && transitTypeCode ) {
111112 const link = await LinkService . fetchLink ( startNodeId , endNodeId , transitTypeCode ) ;
113+ console . log ( link )
112114 if ( ! link ) {
113115 this . props . errorStore ! . addError (
114116 `Haku löytää linkki (alkusolmu ${ startNodeId } , loppusolmu ${ endNodeId } , verkko ${ transitTypeCode } ) ei onnistunut.`
115117 ) ;
116118 const homeViewLink = routeBuilder . to ( SubSites . home ) . toLink ( ) ;
119+ console . log ( homeViewLink )
117120 navigator . goTo ( { link : homeViewLink } ) ;
118121 return ;
119122 }
120123 this . centerMapToLink ( link ) ;
124+ console . log ( "linkstore init" )
121125 this . props . linkStore ! . init ( {
122126 link,
123127 nodes : [ link . startNode , link . endNode ] ,
124128 isNewLink : false ,
125129 } ) ;
130+ console . log ( "setIsLinkGeometryEditable" )
126131 this . props . linkStore ! . setIsLinkGeometryEditable ( true ) ;
127132 const bounds = L . latLngBounds ( link . geometry ) ;
128133 this . props . mapStore ! . setMapBounds ( bounds ) ;
129134
135+ console . log ( link . geometry )
130136 const routePaths : IRoutePathWithDisabledInfo [ ] = await RoutePathService . fetchRoutePathsUsingLink (
131137 link . startNode . id ,
132138 link . endNode . id ,
0 commit comments