Skip to content

Commit

Permalink
feat(protocol-designer): add flex trash (#13102)
Browse files Browse the repository at this point in the history
closes RAUT-543
  • Loading branch information
jerader authored Jul 17, 2023
1 parent 46690d8 commit 1a3fc3c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions protocol-designer/src/components/DeckSetup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const VIEWBOX_MIN_X = -64
export const VIEWBOX_MIN_Y = -10
export const VIEWBOX_WIDTH = 520
export const VIEWBOX_HEIGHT = 414

const FLEX_TRASH_SLOT = 'A3'
const OT2_VIEWBOX = `${VIEWBOX_MIN_X} ${VIEWBOX_MIN_Y} ${VIEWBOX_WIDTH} ${VIEWBOX_HEIGHT}`
const FLEX_VIEWBOX = '-144.31 -76.59 750 580'

Expand Down Expand Up @@ -147,6 +147,7 @@ export const DeckSetupContents = (props: ContentsProps): JSX.Element => {
deckDef,
robotType,
} = props
const trashSlot = robotType === FLEX_ROBOT_TYPE ? FLEX_TRASH_SLOT : '12'

// NOTE: handling module<>labware compat when moving labware to empty module
// is handled by SlotControls.
Expand Down Expand Up @@ -358,7 +359,10 @@ export const DeckSetupContents = (props: ContentsProps): JSX.Element => {
.filter(
slot =>
!slotIdsBlockedBySpanning.includes(slot.id) &&
getSlotIsEmpty(activeDeckSetup, slot.id)
getSlotIsEmpty(activeDeckSetup, slot.id) &&
// todo(jr, 7/13/23): filtering out trash slot for now, remove this
// when we start to support moving the trash location
slot.id !== trashSlot
)
.map(slot => {
return (
Expand Down Expand Up @@ -456,6 +460,7 @@ export const DeckSetup = (): JSX.Element => {
viewBox={robotType === OT2_ROBOT_TYPE ? OT2_VIEWBOX : FLEX_VIEWBOX}
width="100%"
height="100%"
trashSlotName={FLEX_TRASH_SLOT}
>
{({ deckSlotsById, getRobotCoordsFromDOMCoords }) => (
<>
Expand Down

0 comments on commit 1a3fc3c

Please sign in to comment.