mirror of
https://github.com/mathuo/dockview
synced 2025-09-05 00:46:35 +00:00
Merge pull request #959 from mathuo/953-way-to-disable-overlay-on-drag-source
feat: export options as public interface
This commit is contained in:
commit
9eb99f6c87
@ -199,6 +199,14 @@ export type DockviewGroupLocation =
|
|||||||
| { type: 'floating' }
|
| { type: 'floating' }
|
||||||
| { type: 'popout'; getWindow: () => Window; popoutUrl?: string };
|
| { type: 'popout'; getWindow: () => Window; popoutUrl?: string };
|
||||||
|
|
||||||
|
export interface WillShowOverlayLocationEventOptions {
|
||||||
|
readonly kind: DockviewGroupDropLocation;
|
||||||
|
readonly panel: IDockviewPanel | undefined;
|
||||||
|
readonly api: DockviewApi;
|
||||||
|
readonly group: DockviewGroupPanel | undefined;
|
||||||
|
getData: () => PanelTransfer | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
export class WillShowOverlayLocationEvent implements IDockviewEvent {
|
export class WillShowOverlayLocationEvent implements IDockviewEvent {
|
||||||
get kind(): DockviewGroupDropLocation {
|
get kind(): DockviewGroupDropLocation {
|
||||||
return this.options.kind;
|
return this.options.kind;
|
||||||
@ -238,13 +246,7 @@ export class WillShowOverlayLocationEvent implements IDockviewEvent {
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly event: WillShowOverlayEvent,
|
private readonly event: WillShowOverlayEvent,
|
||||||
private readonly options: {
|
readonly options: WillShowOverlayLocationEventOptions
|
||||||
kind: DockviewGroupDropLocation;
|
|
||||||
panel: IDockviewPanel | undefined;
|
|
||||||
api: DockviewApi;
|
|
||||||
group: DockviewGroupPanel | undefined;
|
|
||||||
getData: () => PanelTransfer | undefined;
|
|
||||||
}
|
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user