File tree 2 files changed +4
-4
lines changed
site/src/modules/workspaces/WorkspaceTimingChart 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ export const TimingBlocks: FC<TimingBlocksProps> = ({
18
18
stageSize,
19
19
blockSize,
20
20
} ) => {
21
- const realBlockSize = blockSize + blocksSpacing ;
21
+ const spacingBetweenBlocks = ( timings . length - 1 ) * blocksSpacing ;
22
22
const freeSize = stageSize - blocksPadding * 2 ;
23
- const necessarySize = realBlockSize * timings . length ;
23
+ const necessarySize = blockSize * timings . length + spacingBetweenBlocks ;
24
24
const hasSpacing = necessarySize <= freeSize ;
25
25
const nOfPossibleBlocks = Math . floor (
26
- ( freeSize - moreIconSize ) / realBlockSize ,
26
+ ( freeSize - moreIconSize - spacingBetweenBlocks ) / blockSize ,
27
27
) ;
28
28
const nOfBlocks = hasSpacing ? timings . length : nOfPossibleBlocks ;
29
29
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export const WorkspaceTimingChart: FC<WorkspaceTimingChartProps> = ({
107
107
< TimingBlocks
108
108
timings = { timings }
109
109
stageSize = { stageSize }
110
- blockSize = { 4 }
110
+ blockSize = { 20 }
111
111
/>
112
112
) }
113
113
</ Bar >
You can’t perform that action at this time.
0 commit comments