Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Oct 16, 2023
1 parent 1a28c73 commit d3b5ce5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 13 additions & 3 deletions protocol-designer/src/components/modules/FlexSlotMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import {
SPACING,
} from '@opentrons/components'

const X_ADJUSTMENT_LEFT_SIDE = -101.5
const X_ADJUSTMENT = -17
const X_DIMENSION_MIDDLE_SLOTS = 160.3
const X_DIMENSION_OUTER_SLOTS = 246.5
const Y_DIMENSION = 106.0

interface FlexSlotMapProps {
selectedSlots: string[]
}
Expand Down Expand Up @@ -59,7 +65,9 @@ export function FlexSlotMap(props: FlexSlotMapProps): JSX.Element {
selectedSlot === 'B1' ||
selectedSlot === 'C1' ||
selectedSlot === 'D1'
const xAdjustment = isLeftSideofDeck ? -101.5 : -17
const xAdjustment = isLeftSideofDeck
? X_ADJUSTMENT_LEFT_SIDE
: X_ADJUSTMENT
const x = xSlotPosition + xAdjustment
const yAdjustment = -10
const y = ySlotPosition + yAdjustment
Expand All @@ -70,8 +78,10 @@ export function FlexSlotMap(props: FlexSlotMapProps): JSX.Element {
selectedSlot === 'C2' ||
selectedSlot === 'D2'

const xDimension = isMiddleOfDeck ? 160.3 : 246.5
const yDimension = 106.0
const xDimension = isMiddleOfDeck
? X_DIMENSION_MIDDLE_SLOTS
: X_DIMENSION_OUTER_SLOTS
const yDimension = Y_DIMENSION

return (
<RobotCoordsForeignObject
Expand Down
4 changes: 2 additions & 2 deletions protocol-designer/src/step-forms/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const getSlotIsEmpty = (
return false
}

const filteredAdditioanlEquipmentOnDeck = includeStagingAreas
const filteredAdditionalEquipmentOnDeck = includeStagingAreas
? values(initialDeckSetup.additionalEquipmentOnDeck).filter(
(additionalEquipment: AdditionalEquipmentOnDeck) =>
additionalEquipment.location === slot
Expand All @@ -141,7 +141,7 @@ export const getSlotIsEmpty = (
...values(initialDeckSetup.labware).filter(
(labware: LabwareOnDeckType) => labware.slot === slot
),
...filteredAdditioanlEquipmentOnDeck,
...filteredAdditionalEquipmentOnDeck,
].length === 0
)
}
Expand Down

0 comments on commit d3b5ce5

Please sign in to comment.