-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keep old behaviour in RoutePath when we just have coordinates (and no… #1250
Conversation
… positions) include name property in both cases.
any comments? |
I think we should probably split |
can you check? |
src/map/MapRoutePath.js
Outdated
import { map } from './core/MapView'; | ||
import { getSpeedColor } from '../common/util/colors'; | ||
|
||
const MapRoutePath = ({ name, positions, coordinates }) => { | ||
const MapRoutePath = ({ name, positions }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like name
is never used. We can probably remove it from here.
src/map/MapRouteCoordinates.js
Outdated
'line-width': 2, | ||
}, | ||
}); | ||
if (name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one the name is always provided, so we can probably make it mandatory.
@@ -1,28 +1,13 @@ | |||
import { useTheme } from '@mui/styles'; | |||
import { useId, useEffect } from 'react'; | |||
import { useSelector } from 'react-redux'; | |||
import { map } from './core/MapView'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check the warnings and errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any warnings
src/map/MapRoutePath.js
Outdated
const id = useId(); | ||
|
||
const theme = useTheme(); | ||
|
||
const reportColor = useSelector((state) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the color is based on the position speed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but it means you're ignoring the settings.
… positions)
include name property in both cases.