mirror of
https://github.com/mathuo/dockview
synced 2025-05-06 03:28:25 +00:00
feat: group.api.close
This commit is contained in:
parent
7b0cc492e7
commit
d379b111ee
@ -16,6 +16,7 @@ export interface DockviewGroupPanelApi extends GridviewPanelApi {
|
|||||||
maximize(): void;
|
maximize(): void;
|
||||||
isMaximized(): boolean;
|
isMaximized(): boolean;
|
||||||
exitMaximized(): void;
|
exitMaximized(): void;
|
||||||
|
close(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DockviewGroupPanelFloatingChangeEvent {
|
export interface DockviewGroupPanelFloatingChangeEvent {
|
||||||
@ -46,6 +47,13 @@ export class DockviewGroupPanelApiImpl extends GridviewPanelApiImpl {
|
|||||||
this.addDisposables(this._onDidLocationChange);
|
this.addDisposables(this._onDidLocationChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(): void {
|
||||||
|
if (!this._group) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return this.accessor.removeGroup(this._group);
|
||||||
|
}
|
||||||
|
|
||||||
getWindow(): Window {
|
getWindow(): Window {
|
||||||
return this.location.type === 'popout'
|
return this.location.type === 'popout'
|
||||||
? this.location.getWindow()
|
? this.location.getWindow()
|
||||||
|
Loading…
Reference in New Issue
Block a user