File tree Expand file tree Collapse file tree
src/components/bottom-bar Expand file tree Collapse file tree Original file line number Diff line number Diff line change 113113 }
114114 }
115115
116- & .size-xs {
117- .bottom-bar {
118- .controls-container {
119- .right-controls {
120- display : none ;
121- }
122- }
123- }
124- }
125-
126116 & .size-xs ,
127117 & .size-sm {
128118 .control-button-container :not (.upper-bar-icon ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ export function filterControlsByPriority(
55 currentControlWidth : number ,
66 lowerPriorityControls : string [ ] [ ]
77) : string [ ] {
8- const numOfOverflowControls = Math . ceil ( ( currentMinBreakPointWidth - currentBarWidth ) / currentControlWidth ) || 1 ;
8+ // Add 20% buffer to account for spacing/margins between controls
9+ const overflow = currentMinBreakPointWidth - currentBarWidth ;
10+ const adjustedOverflow = overflow * 1.2 ;
11+
12+ const numOfOverflowControls = Math . ceil ( adjustedOverflow / currentControlWidth ) || 1 ;
913 const controlsToRemove = lowerPriorityControls . flat ( ) . slice ( 0 , numOfOverflowControls ) ;
1014 const priorityPair : string [ ] = [ ...lowerPriorityControls ] . reverse ( ) . find ( p => p . length > 1 ) ! ;
1115 if ( controlsToRemove [ controlsToRemove . length - 1 ] === priorityPair ?. [ 0 ] ) {
You can’t perform that action at this time.
0 commit comments