@@ -689,13 +689,22 @@ const addPanel = (
689689 component : 'layoutPanel' ,
690690 title : definition . title ,
691691 params : { panelId, panelKey, content } ,
692- minimumWidth : 0 ,
693- minimumHeight : 0 ,
692+ minimumWidth : panelId === 'agent' ? 200 : 0 ,
693+ minimumHeight : panelId === 'agent' ? 200 : 0 ,
694694 position : getDefaultPanelPosition ( api , panelId ) ,
695695 //@ts -ignore
696696 disableClose : definition . disableClose ,
697697 } ) ;
698- panel . group . api . setConstraints ( PANEL_CONSTRAINTS ) ;
698+ if ( panelId === 'agent' ) {
699+ panel . group . api . setConstraints ( {
700+ minimumWidth : 200 ,
701+ minimumHeight : 200 ,
702+ } ) ;
703+ // @ts -ignore
704+ panel . group . _snap = true ;
705+ } else {
706+ panel . group . api . setConstraints ( PANEL_CONSTRAINTS ) ;
707+ }
699708 return panel ;
700709} ;
701710
@@ -996,7 +1005,16 @@ export const Layout: React.FC<LayoutProps> = ({
9961005 continue ;
9971006 }
9981007
999- panel . group . api . setConstraints ( PANEL_CONSTRAINTS ) ;
1008+ if ( panelId === 'agent' ) {
1009+ panel . group . api . setConstraints ( {
1010+ minimumWidth : 200 ,
1011+ minimumHeight : 200 ,
1012+ } ) ;
1013+ // @ts -ignore
1014+ panel . group . _snap = true ;
1015+ } else {
1016+ panel . group . api . setConstraints ( PANEL_CONSTRAINTS ) ;
1017+ }
10001018 panel . api . updateParameters ( {
10011019 panelId,
10021020 panelKey : panel . id ,
@@ -1030,16 +1048,25 @@ export const Layout: React.FC<LayoutProps> = ({
10301048 panelKey : targetPanelKey ,
10311049 content : resolvePanelContent ( panelId , targetPanelKey ) ,
10321050 } ,
1033- minimumWidth : 0 ,
1034- minimumHeight : 0 ,
1051+ minimumWidth : panelId === 'agent' ? 200 : 0 ,
1052+ minimumHeight : panelId === 'agent' ? 200 : 0 ,
10351053 position : {
10361054 referenceGroup : pickerPanel . group ,
10371055 direction : 'within' ,
10381056 } ,
10391057 //@ts -ignore
10401058 disableClose : definition . disableClose ,
10411059 } ) ;
1042- targetPanel . group . api . setConstraints ( PANEL_CONSTRAINTS ) ;
1060+ if ( panelId === 'agent' ) {
1061+ targetPanel . group . api . setConstraints ( {
1062+ minimumWidth : 200 ,
1063+ minimumHeight : 200 ,
1064+ } ) ;
1065+ // @ts -ignore
1066+ targetPanel . group . _snap = true ;
1067+ } else {
1068+ targetPanel . group . api . setConstraints ( PANEL_CONSTRAINTS ) ;
1069+ }
10431070
10441071 if ( existingPanel ) {
10451072 targetPanel . api . moveTo ( {
0 commit comments