Skip to content

Commit 3ef87bd

Browse files
refactor: refactor comments around trip overlay hiding
1 parent f8a0ef0 commit 3ef87bd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: lib/components/map/connected-endpoints-overlay.js

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ import { getActiveSearch, getShowUserSettings } from '../../util/state'
1414
const mapStateToProps = (state, ownProps) => {
1515
const { viewedRoute } = state.otp.ui
1616
// If trip viewer is not active, do not show trip on map
17+
// mainPanelContent is null whenever the trip planner is active.
18+
// Some views like the stop viewer can be accessed via the trip planner
19+
// or the route viewer, so include a route being viewed as a condition
20+
// for hiding
1721
if (state.otp.ui.mainPanelContent !== null && viewedRoute) {
1822
return {}
1923
}

Diff for: lib/components/map/connected-transitive-overlay.js

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ const mapStateToProps = (state, ownProps) => {
1010
const { viewedRoute } = state.otp.ui
1111

1212
// If trip viewer is not active, do not show trip on map
13+
// mainPanelContent is null whenever the trip planner is active.
14+
// Some views like the stop viewer can be accessed via the trip planner
15+
// or the route viewer, so include a route being viewed as a condition
16+
// for hiding
1317
if (state.otp.ui.mainPanelContent !== null && viewedRoute) {
1418
return {}
1519
}

0 commit comments

Comments
 (0)