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