feat: group.api.close

This commit is contained in:
mathuo 2024-02-16 22:45:49 +00:00
parent 7b0cc492e7
commit d379b111ee
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281

View File

@ -16,6 +16,7 @@ export interface DockviewGroupPanelApi extends GridviewPanelApi {
maximize(): void;
isMaximized(): boolean;
exitMaximized(): void;
close(): void;
}
export interface DockviewGroupPanelFloatingChangeEvent {
@ -46,6 +47,13 @@ export class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
this.addDisposables(this._onDidLocationChange);
}
close(): void {
if (!this._group) {
return;
}
return this.accessor.removeGroup(this._group);
}
getWindow(): Window {
return this.location.type === 'popout'
? this.location.getWindow()