Skip to content

Commit

Permalink
Add layers for pickup and dropoff waypoints
Browse files Browse the repository at this point in the history
Signed-off-by: angatupyry <fierrofenix@gmail.com>
  • Loading branch information
Angatupyry committed Oct 11, 2023
1 parent 87b60cc commit 12384b9
Showing 1 changed file with 31 additions and 7 deletions.
38 changes: 31 additions & 7 deletions packages/dashboard/src/components/map-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export const MapApp = styled(
Trajectories: false,
Robots: false,
Labels: false,
PickupLabel: false,
DropoffLabel: false,
});
const [openRobotSummary, setOpenRobotSummary] = React.useState(false);
const [selectedRobot, setSelectedRobot] = React.useState<RobotTableData>();
Expand Down Expand Up @@ -466,13 +468,35 @@ export const MapApp = styled(
))}

{!disabledLayers['Labels'] &&
waypoints.map((place, index) => (
<TextThreeRendering
key={index}
position={[place.vertex.x, place.vertex.y, 0]}
text={place.vertex.name}
/>
))}
waypoints
.filter((waypoint) => !waypoint.pickupHandler && !waypoint.dropoffHandler)
.map((place, index) => (
<TextThreeRendering
key={index}
position={[place.vertex.x, place.vertex.y, 0]}
text={place.vertex.name}
/>
))}
{!disabledLayers['PickupLabel'] &&
waypoints
.filter((waypoint) => waypoint.pickupHandler)
.map((place, index) => (
<TextThreeRendering
key={index}
position={[place.vertex.x, place.vertex.y, 0]}
text={place.vertex.name}
/>
))}
{!disabledLayers['DropoffLabel'] &&
waypoints
.filter((waypoint) => waypoint.dropoffHandler)
.map((place, index) => (
<TextThreeRendering
key={index}
position={[place.vertex.x, place.vertex.y, 0]}
text={place.vertex.name}
/>
))}
{!disabledLayers['Ingestors'] &&
ingestorsData.map((ingestor, index) => (
<ShapeThreeRendering
Expand Down

0 comments on commit 12384b9

Please sign in to comment.