mirror of
https://github.com/mathuo/dockview
synced 2025-05-03 01:58:26 +00:00
Merge pull request #513 from mathuo/512-expose-close-on-group-api
feat: group.api.close
This commit is contained in:
commit
70014a8c10
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user