Skip to content

Commit

Permalink
refactor(protocol-designer): adapter support for dropdown and update …
Browse files Browse the repository at this point in the history
…img (#14094)

closes RAUT-891
  • Loading branch information
jerader authored and ncdiehl11 committed Dec 19, 2023
1 parent 983b5d4 commit 1c6681b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Binary file modified protocol-designer/src/images/deck_configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 15 additions & 6 deletions protocol-designer/src/ui/modules/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,21 @@ export function getModuleUnderLabware(
.reverse()[0]
const newLocation = moveLabwareStep?.newLocation

return values(initialDeckSetup.modules).find(
(moduleOnDeck: ModuleOnDeck) =>
(newLocation != null
? newLocation
: initialDeckSetup.labware[labwareId]?.slot) === moduleOnDeck.id
)
return values(initialDeckSetup.modules).find((moduleOnDeck: ModuleOnDeck) => {
const labwareSlot = initialDeckSetup.labware[labwareId]?.slot
let location
if (newLocation != null) {
location = newLocation
} else if (
labwareSlot != null &&
initialDeckSetup.labware[labwareSlot] != null
) {
location = initialDeckSetup.labware[labwareSlot].slot
} else {
location = labwareSlot
}
return location === moduleOnDeck.id
})
}
export function getModuleLabwareOptions(
initialDeckSetup: InitialDeckSetup,
Expand Down

0 comments on commit 1c6681b

Please sign in to comment.