Repository navigation
167 fix parseurl query - #186
Conversation
* Change navbar so that it sets the query points and the routing profile at once * make the query store digest the setrutingparamsatonce action
| if (action instanceof SetPoint) { | ||
| const newState: QueryStoreState = { | ||
| ...state, | ||
| queryPoints: QueryStore.replacePoint(state.queryPoints, action.point), |
There was a problem hiding this comment.
Very minor, but it looks like you changed the order of the if/else blocks for SetPoint and InvalidatePoint here for no real reason? Without this change it would be a bit easier to see what changed in this PR.
There was a problem hiding this comment.
You are right. I changed the order so that SetPoint, AddPoint, SetParametersAtOnce are close to each other. I can put this back however.
There was a problem hiding this comment.
No no that makes sense then! I wasn't sure this was intentional.
| // we want either all the points replaced from the url or we just have one and we want to replace the one default | ||
| // one | ||
| const points = parseResult.points.length > 2 ? parseResult.points : this.fillPoints(parseResult.points) |
There was a problem hiding this comment.
When do we have only a single point and with which default one do we want to replace this?
There was a problem hiding this comment.
This is the case, when the url contains only 1 point. Since we don't have information about the index of this point, this assumes that this single point is the starting point.
There was a problem hiding this comment.
Ah ok if I enter only one point in the url the first input field is populated and the second remains empty. So this seems to work :)
There was a problem hiding this comment.
Yes, that's what I meant :-)
* Add action which sets all routing params at once * Change navbar so that it sets the query points and the routing profile at once * make the query store digest the setrutingparamsatonce action
fixes #167