Skip to content

Commit

Permalink
fix(protocol-designer): Fix flex deck view position in overview (#16680)
Browse files Browse the repository at this point in the history
* fix(protocol-designer): Fix flex deck view position in overview
  • Loading branch information
koji authored Nov 5, 2024
1 parent ddbf5dd commit 49e144f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ export function RobotCoordinateSpaceWithRef(
{}
)

const PADDING = deckDef.otId === 'ot2_standard' ? 5 : 10
if (deckDef.otId === 'ot2_standard') {
const PADDING = 5
wholeDeckViewBox = `${viewBoxOriginX - PADDING} ${
viewBoxOriginY + PADDING * 5
} ${deckXDimension + PADDING * 2} ${deckYDimension - PADDING * 10}`
} else {
const PADDING = 20
wholeDeckViewBox = `${viewBoxOriginX - PADDING} ${
viewBoxOriginY + PADDING
} ${deckXDimension + PADDING * 2} ${deckYDimension + PADDING * 2}`
wholeDeckViewBox = `${viewBoxOriginX + PADDING * 2} ${
viewBoxOriginY - PADDING
} ${deckXDimension + PADDING * 4} ${deckYDimension + PADDING * 3}`
}
}

return (
<Svg
viewBox={zoomed ? viewBox : wholeDeckViewBox}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export function DeckSetupContainer(props: DeckSetupTabType): JSX.Element {
height={zoomIn.slot != null ? '75vh' : '70vh'}
flexDirection={DIRECTION_COLUMN}
padding={SPACING.spacing40}
maxHeight="39.375rem" // this is to block deck view from enlarging
>
<Flex
width="100%"
Expand Down

0 comments on commit 49e144f

Please sign in to comment.