Skip to content

Commit b6f1544

Browse files
committed
feat: update grid layout calculation to reflect physical Tecan deck dimensions
1 parent 1377872 commit b6f1544

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/TecanDeckView/TecanDeckView.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,17 @@ const RIGHT_COLUMN_STYLE = {
7272

7373
/**
7474
* Calculates dynamic grid-template-columns based on which columns have content.
75-
* Empty columns get minimal width (40-60px), filled columns get 1fr.
75+
* Empty columns get minimal width (40-60px), filled columns get proportional sizes
76+
* matching physical Tecan deck dimensions (column 1: 0.5fr, columns 2-3: 1fr).
7677
*/
7778
function calculateGridTemplateColumns(labwares: TecanLabwares): string {
7879
const filledByColumn = getFilledLabwaresByColumn(labwares);
7980

8081
const columnSizes = [
8182
'auto', // Left column (mmPlate)
82-
(filledByColumn[1]?.length ?? 0) > 0 ? '1fr' : 'minmax(40px, 60px)', // Column 1
83-
(filledByColumn[2]?.length ?? 0) > 0 ? '1fr' : 'minmax(40px, 60px)', // Column 2
84-
(filledByColumn[3]?.length ?? 0) > 0 ? '1fr' : 'minmax(40px, 60px)', // Column 3
83+
(filledByColumn[1]?.length ?? 0) > 0 ? '0.5fr' : 'minmax(40px, 60px)', // Column 1 - half size
84+
(filledByColumn[2]?.length ?? 0) > 0 ? '1fr' : 'minmax(40px, 60px)', // Column 2 - standard
85+
(filledByColumn[3]?.length ?? 0) > 0 ? '1fr' : 'minmax(40px, 60px)', // Column 3 - standard
8586
'auto', // Right column (destPcr1/2)
8687
];
8788

0 commit comments

Comments
 (0)