@@ -375,7 +375,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView {
375
375
this . gridWidget . resizeView ( groupView , size ) ;
376
376
}
377
377
378
- arrangeGroups ( arrangement : GroupsArrangement , target = this . activeGroup ) : void {
378
+ arrangeGroups ( arrangement : GroupsArrangement , target : IEditorGroupView | GroupIdentifier = this . activeGroup ) : void {
379
379
if ( this . count < 2 ) {
380
380
return ; // require at least 2 groups to show
381
381
}
@@ -384,6 +384,8 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView {
384
384
return ; // we have not been created yet
385
385
}
386
386
387
+ const groupView = this . assertGroupView ( target ) ;
388
+
387
389
switch ( arrangement ) {
388
390
case GroupsArrangement . EVEN :
389
391
this . gridWidget . distributeViewSizes ( ) ;
@@ -392,24 +394,24 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView {
392
394
if ( this . groups . length < 2 ) {
393
395
return ; // need at least 2 groups to be maximized
394
396
}
395
- this . gridWidget . maximizeView ( target ) ;
396
- target . focus ( ) ;
397
+ this . gridWidget . maximizeView ( groupView ) ;
398
+ groupView . focus ( ) ;
397
399
break ;
398
400
case GroupsArrangement . EXPAND :
399
- this . gridWidget . expandView ( target ) ;
401
+ this . gridWidget . expandView ( groupView ) ;
400
402
break ;
401
403
}
402
404
}
403
405
404
- toggleMaximizeGroup ( target : IEditorGroupView = this . activeGroup ) : void {
406
+ toggleMaximizeGroup ( target : IEditorGroupView | GroupIdentifier = this . activeGroup ) : void {
405
407
if ( this . hasMaximizedGroup ( ) ) {
406
408
this . unmaximizeGroup ( ) ;
407
409
} else {
408
410
this . arrangeGroups ( GroupsArrangement . MAXIMIZE , target ) ;
409
411
}
410
412
}
411
413
412
- toggleExpandGroup ( target : IEditorGroupView = this . activeGroup ) : void {
414
+ toggleExpandGroup ( target : IEditorGroupView | GroupIdentifier = this . activeGroup ) : void {
413
415
if ( this . isGroupExpanded ( this . activeGroup ) ) {
414
416
this . arrangeGroups ( GroupsArrangement . EVEN ) ;
415
417
} else {
@@ -419,8 +421,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupsView {
419
421
420
422
private unmaximizeGroup ( ) : void {
421
423
this . gridWidget . exitMaximizedView ( ) ;
422
- // When making views visible the focus can be affected, so restore it
423
- this . _activeGroup . focus ( ) ;
424
+ this . _activeGroup . focus ( ) ; // When making views visible the focus can be affected, so restore it
424
425
}
425
426
426
427
private hasMaximizedGroup ( ) : boolean {
0 commit comments