File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/dashboard/Data/Browser Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1063,10 +1063,14 @@ export default class DataBrowser extends React.Component {
10631063 }
10641064
10651065 // Update state with all available data
1066+ const newWidth = ( this . state . panelWidth / this . state . panelCount ) * newPanelCount ;
1067+ const limitedWidth = Math . min ( newWidth , this . state . maxWidth ) ;
1068+
10661069 this . setState ( {
10671070 panelCount : newPanelCount ,
10681071 displayedObjectIds : newDisplayedObjectIds ,
1069- multiPanelData : currentObjectData
1072+ multiPanelData : currentObjectData ,
1073+ panelWidth : limitedWidth ,
10701074 } ) ;
10711075
10721076 // Fetch missing data asynchronously
@@ -1086,9 +1090,13 @@ export default class DataBrowser extends React.Component {
10861090 const newPanelCount = prevState . panelCount - 1 ;
10871091 // Remove the last displayed object
10881092 const newDisplayedObjectIds = prevState . displayedObjectIds . slice ( 0 , - 1 ) ;
1093+
1094+ const newWidth = ( prevState . panelWidth / prevState . panelCount ) * newPanelCount ;
1095+
10891096 return {
10901097 panelCount : newPanelCount ,
1091- displayedObjectIds : newDisplayedObjectIds
1098+ displayedObjectIds : newDisplayedObjectIds ,
1099+ panelWidth : newWidth ,
10921100 } ;
10931101 } ) ;
10941102 }
You can’t perform that action at this time.
0 commit comments