Skip to content

Commit

Permalink
fix(app): fix module orientation in intervention modal deck map (#16050)
Browse files Browse the repository at this point in the history
# Overview

On intervention modal deck map, we need to pass an orientation to any
`Module` components on `BaseDeck`. This reflects the actual orientation
of the module on the physical deck.

Closes RQA-3006
  • Loading branch information
ncdiehl11 authored Aug 20, 2024
1 parent d43a8bd commit 3d04c5c
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import {
TYPOGRAPHY,
} from '@opentrons/components'
import {
getDeckDefFromRobotType,
getLoadedLabwareDefinitionsByUri,
getModuleType,
inferModuleOrientationFromXCoordinate,
OT2_ROBOT_TYPE,
TC_MODULE_LOCATION_OT2,
TC_MODULE_LOCATION_OT3,
THERMOCYCLER_MODULE_TYPE,
getDeckDefFromRobotType,
getLoadedLabwareDefinitionsByUri,
getModuleType,
} from '@opentrons/shared-data'

import {
Expand Down Expand Up @@ -213,7 +214,13 @@ export function MoveLabwareInterventionContent({
nestedLabwareDef,
nestedLabwareId,
}) => (
<Module key={moduleId} def={moduleDef} x={x} y={y}>
<Module
key={moduleId}
def={moduleDef}
x={x}
y={y}
orientation={inferModuleOrientationFromXCoordinate(x)}
>
{nestedLabwareDef != null &&
nestedLabwareId !== command.params.labwareId ? (
<LabwareRender definition={nestedLabwareDef} />
Expand Down

0 comments on commit 3d04c5c

Please sign in to comment.