mirror of
https://github.com/mathuo/dockview
synced 2025-05-01 17:18:27 +00:00
Merge pull request #466 from NaNgets/465-add-group-with-options
Add group with options.
This commit is contained in:
commit
87e52f88d0
@ -1281,7 +1281,7 @@ export class DockviewComponent
|
||||
}
|
||||
|
||||
addGroup(options?: AddGroupOptions): DockviewGroupPanel {
|
||||
const group = this.createGroup();
|
||||
const group = this.createGroup(options);
|
||||
|
||||
if (options) {
|
||||
let referenceGroup: DockviewGroupPanel | undefined;
|
||||
|
@ -14,6 +14,7 @@ import { ISplitviewStyles, Orientation } from '../splitview/splitview';
|
||||
import { PanelTransfer } from '../dnd/dataTransfer';
|
||||
import { IDisposable } from '../lifecycle';
|
||||
import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
|
||||
import { GroupOptions } from './dockviewGroupPanelModel';
|
||||
import { IDockviewPanel } from './dockviewPanel';
|
||||
import {
|
||||
ComponentConstructor,
|
||||
@ -186,10 +187,12 @@ type AddGroupOptionsWithGroup = {
|
||||
direction?: Omit<Direction, 'within'>;
|
||||
};
|
||||
|
||||
export type AddGroupOptions =
|
||||
export type AddGroupOptions = (
|
||||
| AddGroupOptionsWithGroup
|
||||
| AddGroupOptionsWithPanel
|
||||
| AbsolutePosition;
|
||||
| AbsolutePosition
|
||||
) &
|
||||
GroupOptions;
|
||||
|
||||
export function isGroupOptionsWithPanel(
|
||||
data: AddGroupOptions
|
||||
|
Loading…
Reference in New Issue
Block a user