diff --git a/packages/dockview-core/src/dockview/dockviewComponent.ts b/packages/dockview-core/src/dockview/dockviewComponent.ts index a2dd416bd..9b33959ab 100644 --- a/packages/dockview-core/src/dockview/dockviewComponent.ts +++ b/packages/dockview-core/src/dockview/dockviewComponent.ts @@ -568,6 +568,19 @@ export class DockviewComponent }); this.addDisposables( + this._rootDropTarget, + this._rootDropTarget.onWillShowOverlay((event) => { + if (this.gridview.length > 0 && event.position === 'center') { + // option only available when no panels in primary grid + return; + } + + this._onWillShowOverlay.fire( + new WillShowOverlayLocationEvent(event, { + kind: 'edge', + }) + ); + }), this._rootDropTarget.onDrop((event) => { const willDropEvent = new DockviewWillDropEvent({ nativeEvent: event.nativeEvent, @@ -576,7 +589,7 @@ export class DockviewComponent api: this._api, group: undefined, getData: getPanelData, - kind: 'content', + kind: 'edge', }); this._onWillDrop.fire(willDropEvent); diff --git a/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts b/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts index 9227b6aa3..6cad9ce71 100644 --- a/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts +++ b/packages/dockview-core/src/dockview/dockviewGroupPanelModel.ts @@ -125,7 +125,11 @@ export interface IHeader { export type DockviewGroupPanelLocked = boolean | 'no-drop-target'; -export type DockviewGroupDropLocation = 'tab' | 'header_space' | 'content'; +export type DockviewGroupDropLocation = + | 'tab' + | 'header_space' + | 'content' + | 'edge'; export interface IDockviewGroupPanelModel extends IPanel { readonly isActive: boolean;