mirror of
https://github.com/mathuo/dockview
synced 2025-01-22 09:25:57 +00:00
replace DockviewDropTragets with DockviewGroupDropLocation
This commit is contained in:
parent
5a635336b3
commit
12c873c7cf
@ -94,7 +94,7 @@ export class ContentContainer
|
||||
return !groupHasOnePanelAndIsActiveDragElement;
|
||||
}
|
||||
|
||||
return this.group.canDisplayOverlay(event, position, 'panel');
|
||||
return this.group.canDisplayOverlay(event, position, 'content');
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -67,7 +67,11 @@ export class VoidContainer extends CompositeDisposable {
|
||||
return last(this.group.panels)?.id !== data.panelId;
|
||||
}
|
||||
|
||||
return group.model.canDisplayOverlay(event, position, 'panel');
|
||||
return group.model.canDisplayOverlay(
|
||||
event,
|
||||
position,
|
||||
'header_space'
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -23,7 +23,7 @@ import {
|
||||
TabDragEvent,
|
||||
TabsContainer,
|
||||
} from './components/titlebar/tabsContainer';
|
||||
import { DockviewDropTargets, IWatermarkRenderer } from './types';
|
||||
import { IWatermarkRenderer } from './types';
|
||||
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
||||
import { IDockviewPanel } from './dockviewPanel';
|
||||
import { IHeaderActionsRenderer } from './options';
|
||||
@ -175,7 +175,7 @@ export interface IDockviewGroupPanelModel extends IPanel {
|
||||
canDisplayOverlay(
|
||||
event: DragEvent,
|
||||
position: Position,
|
||||
target: DockviewDropTargets
|
||||
target: DockviewGroupDropLocation
|
||||
): boolean;
|
||||
}
|
||||
|
||||
@ -924,7 +924,7 @@ export class DockviewGroupPanelModel
|
||||
canDisplayOverlay(
|
||||
event: DragEvent,
|
||||
position: Position,
|
||||
target: DockviewDropTargets
|
||||
target: DockviewGroupDropLocation
|
||||
): boolean {
|
||||
// custom overlay handler
|
||||
if (this.accessor.options.showDndOverlay) {
|
||||
|
@ -6,7 +6,6 @@ import {
|
||||
ITabRenderer,
|
||||
WatermarkConstructor,
|
||||
IWatermarkRenderer,
|
||||
DockviewDropTargets,
|
||||
} from './types';
|
||||
import { Parameters } from '../panel/types';
|
||||
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
||||
@ -14,7 +13,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 { DockviewGroupDropLocation, GroupOptions } from './dockviewGroupPanelModel';
|
||||
import { IDockviewPanel } from './dockviewPanel';
|
||||
import {
|
||||
ComponentConstructor,
|
||||
@ -65,7 +64,7 @@ export interface ViewFactoryData {
|
||||
|
||||
export interface DockviewDndOverlayEvent {
|
||||
nativeEvent: DragEvent;
|
||||
target: DockviewDropTargets;
|
||||
target: DockviewGroupDropLocation;
|
||||
position: Position;
|
||||
group?: DockviewGroupPanel;
|
||||
getData: () => PanelTransfer | undefined;
|
||||
|
@ -7,8 +7,6 @@ import { Optional } from '../types';
|
||||
import { DockviewGroupPanel, IDockviewGroupPanel } from './dockviewGroupPanel';
|
||||
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
||||
|
||||
export type DockviewDropTargets = 'tab' | 'panel' | 'tabContainer' | 'edge';
|
||||
|
||||
export interface HeaderPartInitParameters {
|
||||
title: string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user