Skip to content

Commit

Permalink
refactor: move Position column more to the end of the drone status line
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-advantitge committed Nov 2, 2024
1 parent 38a1270 commit 07fc068
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions src/views/uavs/DroneStatusLine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,6 @@ const DroneStatusLine = ({
>
{abbreviateGPSFixType(gpsFixType)}
</StatusPill>
{localPosition ? (
padEnd(localCoordinateFormatter(localPosition), 25)
) : position ? (
padEnd(coordinateFormatter([position.lon, position.lat]), 25)
) : (
<span className={classes.muted}>{padEnd('no position', 25)}</span>
)}
{!isNil(amsl) ? (
padStart(position.amsl.toFixed(1), 6) + 'm'
) : (
Expand All @@ -194,6 +187,13 @@ const DroneStatusLine = ({
<StatusText status={headingDeviationToStatus(headingDeviation)}>
{padStart(!isNil(heading) ? Math.round(heading) + '°' : '', 5)}
</StatusText>
{localPosition ? (
padEnd(localCoordinateFormatter(localPosition), 25)
) : position ? (
padEnd(coordinateFormatter([position.lon, position.lat]), 25)
) : (
<span className={classes.muted}>{padEnd('no position', 25)}</span>
)}
<span className={classes.debugString}>
{debugString ? ' ' + debugString : ''}
</span>
Expand Down
14 changes: 7 additions & 7 deletions src/views/uavs/SortAndFilterHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,6 @@ const COMMON_HEADER_TEXT_PARTS = Object.freeze([
width: 40,
},
},
{
label: 'Position',
style: {
textAlign: 'left',
width: 198,
},
},
{
label: 'AMSL',
sortKey: UAVSortKey.ALTITUDE_MSL,
Expand Down Expand Up @@ -239,6 +232,13 @@ const COMMON_HEADER_TEXT_PARTS = Object.freeze([
width: 40,
},
},
{
label: 'Position',
style: {
textAlign: 'left',
width: 198,
},
},
{
label: 'Details',
style: {
Expand Down

0 comments on commit 07fc068

Please sign in to comment.