Merge pull request #513 from mathuo/512-expose-close-on-group-api

feat: group.api.close
This commit is contained in:
mathuo 2024-02-16 22:51:02 +00:00 committed by GitHub
commit 70014a8c10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()