Skip to content

Commit a3caaab

Browse files
authored
fix(protocol-designer): deck view size issue (#19145)
* fix(protocol-designer): deck view size issue
1 parent d648053 commit a3caaab

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

protocol-designer/src/pages/Designer/DeckSetup/DeckSetupContainer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ export function DeckSetupContainer(
241241
minWidth="auto"
242242
deckDef={deckDef}
243243
viewBox={viewBoxAdjusted}
244-
transform={'scale(1.3, -1.3)'}
244+
transform={
245+
robotType === OT2_ROBOT_TYPE
246+
? 'scale(1.3, -1.3)'
247+
: 'scale(1, -1)'
248+
}
245249
outline="auto"
246250
zoomed={zoomIn.slot != null}
247251
borderRadius={BORDERS.borderRadius12}

protocol-designer/src/pages/Designer/DeckSetup/__tests__/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('getSVGContainerWidth', () => {
129129

130130
it('returns 70% for non-OT2 robot type, not zoomed', () => {
131131
const result = getSVGContainerWidth(FLEX_ROBOT_TYPE, false)
132-
expect(result).toBe('70%')
132+
expect(result).toBe('100%')
133133
})
134134

135135
it('returns 100% for OT2 robot type, and zoomed', () => {

protocol-designer/src/pages/Designer/DeckSetup/utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,6 @@ export const getSVGContainerWidth = (
542542
if (robotType === OT2_ROBOT_TYPE && !isZoomed) {
543543
return '78.5%'
544544
}
545-
if (robotType !== OT2_ROBOT_TYPE && !isZoomed) {
546-
return '70%'
547-
}
548545
return '100%'
549546
}
550547

0 commit comments

Comments
 (0)